aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/db
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/db')
-rw-r--r--phpBB/db/mssql.php11
-rw-r--r--phpBB/db/mysql.php9
-rw-r--r--phpBB/db/odbc.php11
-rw-r--r--phpBB/db/oracle.php16
-rw-r--r--phpBB/db/postgres7.php11
5 files changed, 10 insertions, 48 deletions
diff --git a/phpBB/db/mssql.php b/phpBB/db/mssql.php
index eadfcf265a..393f5fdd24 100644
--- a/phpBB/db/mssql.php
+++ b/phpBB/db/mssql.php
@@ -10,15 +10,6 @@
*
***************************************************************************/
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
if(!defined("SQL_LAYER"))
{
@@ -204,6 +195,8 @@ class sql_db
}
else
{
+ $query = preg_replace("/\\\'/s", "''", $query);
+
$this->query_result = @mssql_query($query, $this->db_connect_id);
if($this->query_result)
{
diff --git a/phpBB/db/mysql.php b/phpBB/db/mysql.php
index 0e123a8244..ab558892e3 100644
--- a/phpBB/db/mysql.php
+++ b/phpBB/db/mysql.php
@@ -10,15 +10,6 @@
*
***************************************************************************/
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
if(!defined("SQL_LAYER"))
{
diff --git a/phpBB/db/odbc.php b/phpBB/db/odbc.php
index f47b67be90..ee6ca446d5 100644
--- a/phpBB/db/odbc.php
+++ b/phpBB/db/odbc.php
@@ -1,6 +1,6 @@
<?php
/***************************************************************************
- * odbc.php
+ * odbc.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
@@ -10,15 +10,6 @@
*
***************************************************************************/
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
if(!defined("SQL_LAYER"))
{
diff --git a/phpBB/db/oracle.php b/phpBB/db/oracle.php
index a7dc09eb33..8879567513 100644
--- a/phpBB/db/oracle.php
+++ b/phpBB/db/oracle.php
@@ -1,6 +1,6 @@
<?php
/***************************************************************************
- * oracle.php
+ * oracle.php
* -------------------
* begin : Thrusday Feb 15, 2001
* copyright : (C) 2001 The phpBB Group
@@ -10,15 +10,6 @@
*
***************************************************************************/
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
if(!defined("SQL_LAYER"))
{
@@ -109,6 +100,11 @@ class sql_db
}
}
+ if(eregi("^(INSERT|UPDATE) ", $query))
+ {
+ $query = preg_replace("/\\\'/s", "''", $query);
+ }
+
$this->query_result = @OCIParse($this->db_connect_id, $query);
$success = @OCIExecute($this->query_result);
}
diff --git a/phpBB/db/postgres7.php b/phpBB/db/postgres7.php
index e0c54037d5..b06123b167 100644
--- a/phpBB/db/postgres7.php
+++ b/phpBB/db/postgres7.php
@@ -1,6 +1,6 @@
<?php
/***************************************************************************
- * postgres7.php
+ * postgres7.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
@@ -10,15 +10,6 @@
*
***************************************************************************/
- /***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
if(!defined("SQL_LAYER"))
{