summaryrefslogtreecommitdiffstats
path: root/system/drivers
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-08-27 21:32:02 +0200
committeradmin <devnull@localhost>2006-08-27 21:32:02 +0200
commit1082bddc0c065895a3b39607cb930f5a101f54fb (patch)
tree2c19cb7dcee82642f2a072bf9f432091fda4c8b1 /system/drivers
parent0d29605b1e774efd57ffd8f5ccc8eaec1e9ca576 (diff)
Diffstat (limited to 'system/drivers')
-rw-r--r--system/drivers/DB_mssql.php4
-rw-r--r--system/drivers/DB_mysqli.php4
2 files changed, 5 insertions, 3 deletions
diff --git a/system/drivers/DB_mssql.php b/system/drivers/DB_mssql.php
index 48d1929e3..f6e672b94 100644
--- a/system/drivers/DB_mssql.php
+++ b/system/drivers/DB_mssql.php
@@ -109,8 +109,8 @@ class CI_DB_mssql extends CI_DB {
*/
function escape_str($str)
{
- // MS SQL doesn't require escaping
- return $str;
+ // Escape single quotes
+ return str_replace("'", "''", $str);
}
// --------------------------------------------------------------------
diff --git a/system/drivers/DB_mysqli.php b/system/drivers/DB_mysqli.php
index 75c01e7f8..fadcdd3c4 100644
--- a/system/drivers/DB_mysqli.php
+++ b/system/drivers/DB_mysqli.php
@@ -88,7 +88,9 @@ class CI_DB_mysqli extends CI_DB {
function execute($sql)
{
$sql = $this->_prep_query($sql);
- return @mysqli_query($this->conn_id, $sql);
+ $result = @mysqli_query($this->conn_id, $sql);
+ mysqli_next_result($this->conn_id);
+ return $result;
}
// --------------------------------------------------------------------