diff options
author | admin <devnull@localhost> | 2006-10-25 07:12:34 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-25 07:12:34 +0200 |
commit | 1716cb80344dcb09dd263293b7901cd5b669e302 (patch) | |
tree | 544c6f45fe307cdd2a1d0f6a5f2bc05f0bceca49 /system/database | |
parent | 2bc13859b72ceb8400d37adbba52b8404995bf03 (diff) |
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_result.php | 6 | ||||
-rw-r--r-- | system/database/drivers/mssql/mssql_result.php | 2 | ||||
-rw-r--r-- | system/database/drivers/mssql/mssql_utility.php | 2 | ||||
-rw-r--r-- | system/database/drivers/mysql/mysql_result.php | 2 | ||||
-rw-r--r-- | system/database/drivers/mysql/mysql_utility.php | 2 | ||||
-rw-r--r-- | system/database/drivers/mysqli/mysqli_result.php | 2 | ||||
-rw-r--r-- | system/database/drivers/mysqli/mysqli_utility.php | 2 | ||||
-rw-r--r-- | system/database/drivers/postgre/postgre_result.php | 2 | ||||
-rw-r--r-- | system/database/drivers/postgre/postgre_utility.php | 2 | ||||
-rw-r--r-- | system/database/drivers/sqlite/sqlite_result.php | 2 |
10 files changed, 12 insertions, 12 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 5c8b4c3ae..9784561d4 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -66,11 +66,11 @@ class CI_DB_result { // In the event that query caching is on the result_id variable // will return FALSE since there isn't a valid SQL resource so // we'll simply return an empty array. - if ($this->result_id === FALSE) + if ($this->result_id === FALSE OR $this->num_rows() == 0) { return array(); } - + $this->_data_seek(0); while ($row = $this->_fetch_object()) { @@ -98,7 +98,7 @@ class CI_DB_result { // In the event that query caching is on the result_id variable // will return FALSE since there isn't a valid SQL resource so // we'll simply return an empty array. - if ($this->result_id === FALSE) + if ($this->result_id === FALSE OR $this->num_rows() == 0) { return array(); } diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 230c1b55b..eb7afef70 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -135,7 +135,7 @@ class CI_DB_mssql_result extends CI_DB_result { */ function _data_seek($n = 0) { - mssql_data_seek($this->result_id, $n); + return mssql_data_seek($this->result_id, $n); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php index 4a49f533e..b24646123 100644 --- a/system/database/drivers/mssql/mssql_utility.php +++ b/system/database/drivers/mssql/mssql_utility.php @@ -61,7 +61,7 @@ class CI_DB_mssql_utility extends CI_DB_utility { */ function _drop_table($table) { - return "DROP TABLE ".$this->db->_escape_table($name); + return "DROP TABLE ".$this->db->_escape_table($table); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 4bfaf54a4..9b28dead7 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -135,7 +135,7 @@ class CI_DB_mysql_result extends CI_DB_result { */ function _data_seek($n = 0) { - mysql_data_seek($this->result_id, $n); + return mysql_data_seek($this->result_id, $n); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php index b0a7dfea7..32007d224 100644 --- a/system/database/drivers/mysql/mysql_utility.php +++ b/system/database/drivers/mysql/mysql_utility.php @@ -73,7 +73,7 @@ class CI_DB_mysql_utility extends CI_DB_utility { */ function _drop_table($table) { - return "DROP TABLE IF EXISTS ".$this->db->_escape_table($name); + return "DROP TABLE IF EXISTS ".$this->db->_escape_table($table); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index 5e4e65ff7..be7ec356c 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -135,7 +135,7 @@ class CI_DB_mysqli_result extends CI_DB_result { */ function _data_seek($n = 0) { - mysqli_data_seek($this->result_id, $n); + return mysqli_data_seek($this->result_id, $n); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php index a7bdb708e..d5dbf2fb0 100644 --- a/system/database/drivers/mysqli/mysqli_utility.php +++ b/system/database/drivers/mysqli/mysqli_utility.php @@ -60,7 +60,7 @@ class CI_DB_mysqli_utility extends CI_DB_utility { */ function _drop_table($table) { - return "DROP TABLE IF EXISTS ".$this->db->_escape_table($name); + return "DROP TABLE IF EXISTS ".$this->db->_escape_table($table); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php index 76bd60187..f065e54fb 100644 --- a/system/database/drivers/postgre/postgre_result.php +++ b/system/database/drivers/postgre/postgre_result.php @@ -135,7 +135,7 @@ class CI_DB_postgre_result extends CI_DB_result { */ function _data_seek($n = 0) { - pg_result_seek($this->result_id, $n); + return pg_result_seek($this->result_id, $n); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php index 478e74276..bebe09415 100644 --- a/system/database/drivers/postgre/postgre_utility.php +++ b/system/database/drivers/postgre/postgre_utility.php @@ -74,7 +74,7 @@ class CI_DB_postgre_utility extends CI_DB_utility { */ function _drop_table($table) { - return "DROP TABLE ".$this->db->_escape_table($name)." CASCADE"; + return "DROP TABLE ".$this->db->_escape_table($table)." CASCADE"; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php index 00045d06c..a406a935c 100644 --- a/system/database/drivers/sqlite/sqlite_result.php +++ b/system/database/drivers/sqlite/sqlite_result.php @@ -131,7 +131,7 @@ class CI_DB_sqlite_result extends CI_DB_result { */ function _data_seek($n = 0) { - sqlite_seek($this->result_id, $n); + return sqlite_seek($this->result_id, $n); } // -------------------------------------------------------------------- |