From 448148b0d8ed1459662cfe501197686b8a48b609 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Sat, 20 Aug 2011 14:23:14 -0500 Subject: Fixed a bug (#200) where MySQL queries would be malformed after calling db->count_all() then db->get() --- system/database/drivers/cubrid/cubrid_driver.php | 1 + system/database/drivers/mssql/mssql_driver.php | 1 + system/database/drivers/mysql/mysql_driver.php | 1 + system/database/drivers/mysqli/mysqli_driver.php | 1 + system/database/drivers/oci8/oci8_driver.php | 1 + system/database/drivers/odbc/odbc_driver.php | 1 + system/database/drivers/postgre/postgre_driver.php | 1 + system/database/drivers/sqlite/sqlite_driver.php | 1 + system/database/drivers/sqlsrv/sqlsrv_driver.php | 1 + 9 files changed, 9 insertions(+) (limited to 'system') diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 3f0109249..d01140412 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -398,6 +398,7 @@ class CI_DB_cubrid_driver extends CI_DB { } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 65397ed8f..b39bd9360 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -367,6 +367,7 @@ class CI_DB_mssql_driver extends CI_DB { } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 28c75a5e3..872504564 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -385,6 +385,7 @@ class CI_DB_mysql_driver extends CI_DB { } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index b1796c9df..ddcaff323 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -386,6 +386,7 @@ class CI_DB_mysqli_driver extends CI_DB { } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index b4da3e965..930177e62 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -470,6 +470,7 @@ class CI_DB_oci8_driver extends CI_DB { } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 6e4ba896f..bcd7937d9 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -339,6 +339,7 @@ class CI_DB_odbc_driver extends CI_DB { } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 140396885..5367f9759 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -385,6 +385,7 @@ class CI_DB_postgre_driver extends CI_DB { } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index eb4e585b3..0cc898b38 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -354,6 +354,7 @@ class CI_DB_sqlite_driver extends CI_DB { } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 1d32792ce..400fd31c6 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -344,6 +344,7 @@ class CI_DB_sqlsrv_driver extends CI_DB { return '0'; $row = $query->row(); + $this->_reset_select(); return $row->numrows; } -- cgit v1.2.3-24-g4f1b