mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Bugtracker #3916 possible fix - sort out return value
This commit is contained in:
@@ -12,8 +12,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
|
||||||
| $Revision: 1.10 $
|
| $Revision: 1.11 $
|
||||||
| $Date: 2007-04-18 20:57:59 $
|
| $Date: 2007-04-22 09:07:27 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -27,7 +27,7 @@ $db_mySQLQueryCount = 0; // Global total number of db object queries (all db's)
|
|||||||
* MySQL Abstraction class
|
* MySQL Abstraction class
|
||||||
*
|
*
|
||||||
* @package e107
|
* @package e107
|
||||||
* @version $Revision: 1.10 $
|
* @version $Revision: 1.11 $
|
||||||
* @author $Author: e107steved $
|
* @author $Author: e107steved $
|
||||||
*/
|
*/
|
||||||
class db {
|
class db {
|
||||||
@@ -524,13 +524,18 @@ class db {
|
|||||||
if(strpos($query,'#') !== FALSE) {
|
if(strpos($query,'#') !== FALSE) {
|
||||||
$query = preg_replace_callback("/\s#([\w]*?)\W/", array($this, 'ml_check'), $query);
|
$query = preg_replace_callback("/\s#([\w]*?)\W/", array($this, 'ml_check'), $query);
|
||||||
}
|
}
|
||||||
switch ($this->mySQLresult = $this->db_Query($query, NULL, 'db_Select_gen', $debug, $log_type, $log_remark))
|
if (($this->mySQLresult = $this->db_Query($query, NULL, 'db_Select_gen', $debug, $log_type, $log_remark)) === TRUE)
|
||||||
{
|
{ // Successful query which doesn't return a row count
|
||||||
case TRUE: return TRUE;
|
$this->dbError('db_Select_gen');
|
||||||
case FALSE :
|
return TRUE;
|
||||||
|
}
|
||||||
|
elseif (($this->mySQLresult = $this->db_Query($query, NULL, 'db_Select_gen', $debug, $log_type, $log_remark)) === FALSE)
|
||||||
|
{ // Failed query
|
||||||
$this->dbError('dbQuery ('.$query.')');
|
$this->dbError('dbQuery ('.$query.')');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
default :
|
}
|
||||||
|
else
|
||||||
|
{ // Successful query which does return a row count - get the count and return it
|
||||||
$this->dbError('db_Select_gen');
|
$this->dbError('db_Select_gen');
|
||||||
return $this->db_Rows();
|
return $this->db_Rows();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user