summaryrefslogtreecommitdiff
path: root/db.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-10-13 02:05:47 +0100
committerAndrew Dolgov <[email protected]>2005-10-13 02:05:47 +0100
commit8b7395bb64506180f9b7a76b00948cd4f3cb9de3 (patch)
tree4b4d130b133fdb2b7f487f3c6534bfcdab6f0075 /db.php
parent1696229f9df3a65e06246ea9e5b1ee1424f4c02a (diff)
escape data on OPML import (take 2)
Diffstat (limited to 'db.php')
-rw-r--r--db.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/db.php b/db.php
index 5db48273c..44187db0f 100644
--- a/db.php
+++ b/db.php
@@ -41,6 +41,16 @@ function db_escape_string($s) {
}
}
+/* I hate MySQL :( */
+
+function db_escape_string_2($s, $link) {
+ if (DB_TYPE == "pgsql") {
+ return pg_escape_string($s);
+ } else {
+ return mysql_real_escape_string($s, $link);
+ }
+}
+
function db_query($link, $query) {
if (DB_TYPE == "pgsql") {
$result = pg_query($link, $query);