summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysql/mysql_driver.php
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-03-12 14:44:42 +0100
committerMike Funk <mfunk@xulonpress.com>2012-03-12 14:44:42 +0100
commit306f56c1bfdafd149b1059325a687ec1a185d00f (patch)
tree62e2261c3b429153b9e62f3f676d7de6c18a6bfb /system/database/drivers/mysql/mysql_driver.php
parentdb70d047a6ac256eb336a2b04385aa010d6cbf42 (diff)
parentb3442a165a091c552a3331ece94297d5fe316fee (diff)
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into feature/all_flashdata
Diffstat (limited to 'system/database/drivers/mysql/mysql_driver.php')
-rw-r--r--system/database/drivers/mysql/mysql_driver.php19
1 files changed, 3 insertions, 16 deletions
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index cd1763751..071ce4327 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -149,9 +149,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
protected function _db_set_charset($charset, $collation)
{
- return function_exists('mysql_set_charset')
- ? @mysql_set_charset($charset, $this->conn_id)
- : @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id);
+ return @mysql_set_charset($charset, $this->conn_id);
}
// --------------------------------------------------------------------
@@ -289,18 +287,7 @@ class CI_DB_mysql_driver extends CI_DB {
return $str;
}
- if (function_exists('mysql_real_escape_string') && is_resource($this->conn_id))
- {
- $str = mysql_real_escape_string($str, $this->conn_id);
- }
- elseif (function_exists('mysql_escape_string'))
- {
- $str = mysql_escape_string($str);
- }
- else
- {
- $str = addslashes($str);
- }
+ $str = is_resource($this->conn_id) ? mysql_real_escape_string($str, $this->conn_id) : addslashes($str);
// escape LIKE condition wildcards
if ($like === TRUE)