summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysql/mysql_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/mysql/mysql_driver.php')
-rw-r--r--system/database/drivers/mysql/mysql_driver.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index d4f322d5f..792e023a8 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -227,9 +227,13 @@ class CI_DB_mysql_driver extends CI_DB {
return $str;
}
- if (function_exists('mysql_escape_string'))
+ if (function_exists('mysql_real_escape_string'))
{
- return mysql_real_escape_string($str);
+ return mysql_real_escape_string($str, $this->conn_id);
+ }
+ elseif (function_exists('mysql_escape_string'))
+ {
+ return mysql_escape_string($str);
}
else
{