|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-12-16 01:15 UTC] iliaa@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 21:00:02 2025 UTC | 
Description: ------------ When using sqlite_single_query and the return value from the query is 0 (zero) it's handled as if the query failed. The code will not output 0, but instead die with the following message: "not an error" The value of $result is set to 0, which is expected. Reproduce code: --------------- <?php $db = sqlite_open("test.db"); sqlite_query($db, "CREATE TABLE Test ( number NUMERIC )"); sqlite_query($db, "INSERT INTO Test (number) VALUES (0)"); $result = @sqlite_single_query($db, "SELECT number FROM Test") or die(sqlite_error_string(sqlite_last_error($db))); echo $result; ?> Expected result: ---------------- A return value of 0 from the database being returned to $result without an exception.