note 51994 deleted from function.sqlite-array-query by cmb
| From: | cmb@php.net | Date: | Mon, 02 Nov 2020 14:57:31 +0000 |
| Subject: | note 51994 deleted from function.sqlite-array-query by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215717@lists.php.net to get a copy of this message | ||
Note Submitter: kendlj at NOSPAM dot web dot de
----
Do not use this code, whenever you may get no result:
<?
$return_data=@sqlite_array_query($query,$databaseHandle);
if(!$return_data)
{
//Errorhandling code
die( sqlite_error_string( sqlite_last_error($this->databaseHandle) ) );
}
?>
It will execute the Errorhandling code although there is no error, cause if there is nothing found,
sqlite_array_query returns an empty array, which is interpreted as 'false' here.
You will get an Message like:
'not an error'
Instead use:
<?
$return_data=@sqlite_array_query($query,$databaseHandle);
if($return_data===false)
{
//Errorhandling code
}
?>