diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-02-11 06:54:44 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-02-11 06:54:44 +0100 |
commit | c0743381b20910a3fc23b391e8b2009ac5771ae8 (patch) | |
tree | d456d728a363a11f3b634a128fcbf5fb61331d64 /system/database/drivers | |
parent | 70529a739dd0a73fc72124720390313d8a8b0dca (diff) |
database enhancements, compatibility additions and bugfixes
Diffstat (limited to 'system/database/drivers')
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 4 | ||||
-rw-r--r-- | system/database/drivers/mysql/mysql_driver.php | 2 | ||||
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 4 | ||||
-rw-r--r-- | system/database/drivers/oci8/oci8_driver.php | 4 | ||||
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 4 | ||||
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 8e12a2d21..7b024d414 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -408,9 +408,9 @@ class CI_DB_mssql_driver extends CI_DB { // I don't believe this is necessary with MS SQL. Not sure, though. - Rick
/*
- if (stristr($table, '.'))
+ if (strpos($table, '.') !== FALSE)
{
- $table = preg_replace("/\./", "`.`", $table);
+ $table = '"' . str_replace('.', '"."', $table) . '"';
}
*/
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 372365aeb..edf09a170 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -418,7 +418,7 @@ class CI_DB_mysql_driver extends CI_DB { {
if (strpos($table, '.') !== FALSE)
{
- $table = str_replace('.', '`.`', $table);
+ $table = '`' . str_replace('.', '`.`', $table) . '`';
}
return $table;
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 31c27117c..dab56c7e7 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -410,9 +410,9 @@ class CI_DB_mysqli_driver extends CI_DB { */
function _escape_table($table)
{
- if (stristr($table, '.'))
+ if (strpos($table, '.') !== FALSE)
{
- $table = preg_replace("/\./", "`.`", $table);
+ $table = '`' . str_replace('.', '`.`', $table) . '`';
}
return $table;
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 8f63c25a5..ec26f5be6 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -521,9 +521,9 @@ class CI_DB_oci8_driver extends CI_DB { */
function _escape_table($table)
{
- if (stristr($table, '.'))
+ if (strpos($table, '.') !== FALSE)
{
- $table = preg_replace("/\./", "`.`", $table);
+ $table = '"' . str_replace('.', '"."', $table) . '"';
}
return $table;
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index dd10fbdd3..fd2460853 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -386,9 +386,9 @@ class CI_DB_odbc_driver extends CI_DB { */
function _escape_table($table)
{
- if (stristr($table, '.'))
+ if (strpos($table, '.') !== FALSE)
{
- $table = preg_replace("/\./", "`.`", $table);
+ $table = '`' . str_replace('.', '`.`', $table) . '`';
}
return $table;
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index a32c37ed8..ce8cb258a 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -406,9 +406,9 @@ class CI_DB_postgre_driver extends CI_DB { */
function _escape_table($table)
{
- if (stristr($table, '.'))
+ if (strpos($table, '.') !== FALSE)
{
- $table = '"'.preg_replace("/\./", '"."', $table).'"';
+ $table = '"' . str_replace('.', '"."', $table) . '"';
}
return $table;
|