diff options
Diffstat (limited to 'system/database/drivers')
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 7 | ||||
-rw-r--r-- | system/database/drivers/oci8/oci8_driver.php | 5 | ||||
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 5 |
3 files changed, 13 insertions, 4 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 9d7e072a4..1c6249aef 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -212,9 +212,12 @@ class CI_DB_mssql_driver extends CI_DB { * @return string
*/
function escape_str($str)
- {
+ {
+ // Access the CI object
+ $CI->get_instance();
+
// Escape single quotes
- return str_replace("'", "''", $this->CI->input->_remove_invisible_characters($str));
+ return str_replace("'", "''", $CI->input->_remove_invisible_characters($str));
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 362da58fb..82bc51bf3 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -367,7 +367,10 @@ class CI_DB_oci8_driver extends CI_DB { */
function escape_str($str)
{
- return $this->input->CI->_remove_invisible_characters($str);
+ // Access the CI object
+ $CI->get_instance();
+
+ return $CI->_remove_invisible_characters($str);
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 7c59c3060..985c975ce 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -242,8 +242,11 @@ class CI_DB_odbc_driver extends CI_DB { */
function escape_str($str)
{
+ // Access the CI object
+ $CI->get_instance();
+
// ODBC doesn't require escaping
- return $this->input->CI->_remove_invisible_characters($str);
+ return $CI->_remove_invisible_characters($str);
}
// --------------------------------------------------------------------
|