PHP-MySQL-Class icon indicating copy to clipboard operation
PHP-MySQL-Class copied to clipboard

Return true in ExecuteSQL could be a confusing point

Open hellomaya opened this issue 10 years ago • 0 comments

if($this->records > 0){ $this->ArrayResults(); return $this->arrayedResult; }else{ return true; }

When we use ExecuteSQL, commonly here we can't use :

$ret = $db->ExecuteSQL (....); if (empty($ret)) { }

coz it's always "TRUE", so you don't know it's empty.

hellomaya avatar Apr 01 '14 09:04 hellomaya