From ff73401cdef0136c15c6dab95d4d722123668e7a Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Tue, 30 Sep 2008 20:38:12 +0000 Subject: Did a little clean up. Nothing that affected functionality --- system/database/drivers/mysql/mysql_driver.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'system/database/drivers/mysql/mysql_driver.php') diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index de372e669..52df1e591 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -314,6 +314,9 @@ class CI_DB_mysql_driver extends CI_DB { $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows'). " FROM " . $this->_protect_identifiers($this->dbprefix.$table)); + if ($query->num_rows() == 0) + return '0'; + $row = $query->row(); return (int)$row->numrows; } -- cgit v1.2.3-24-g4f1b