aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/db/mssql.php10
-rw-r--r--phpBB/db/mysql4.php10
2 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/db/mssql.php b/phpBB/db/mssql.php
index a6634f6a86..6cf118b22a 100644
--- a/phpBB/db/mssql.php
+++ b/phpBB/db/mssql.php
@@ -403,6 +403,16 @@ class sql_db
return ( $query_id ) ? mssql_free_result($query_id) : false;
}
+ function sql_quote($sql)
+ {
+ return str_replace("\'", "''", $sql);
+ }
+
+ function sql_escape($sql)
+ {
+ return str_replace("'", "''", str_replace('\\', '\\\\', $sql));
+ }
+
function sql_error($query_id = 0)
{
$result['message'] = @mssql_get_last_message();
diff --git a/phpBB/db/mysql4.php b/phpBB/db/mysql4.php
index 6c1b027697..d6f00ed1d6 100644
--- a/phpBB/db/mysql4.php
+++ b/phpBB/db/mysql4.php
@@ -379,6 +379,16 @@ if (!empty($_REQUEST['explain']))
return ( $query_id ) ? @mysql_free_result($query_id) : false;
}
+ function sql_quote($msg)
+ {
+ return mysql_escape_string($msg);
+ }
+
+ function sql_escape($msg)
+ {
+ return mysql_escape_string($msg);
+ }
+
function sql_error($sql = '')
{
if ( !$this->return_on_error )