sqlite3_seek()
Status: Alpha
Brought to you by:
bfleisch
Could you add the function sqlite3_seek() to the API
for php-sqlite3?
After I check if the result set is valid and did not
cause an error, I use sqlite_seek to check that more
than 0 rows were returned by the query (this example is
using the sqlite2 calls included with php5):
$db = sqlite_open("somedbfile.db");
$res = sqlite_query($db, "select * from table");
if ($res === false) {
print "An error occured";
}
if (sqlite_seek($res, 0) === false) {
print "there were 0 records in the query";
} else {
... read result set ...
Maybe there is something else I could do, but this is
function is pretty handy. Any suggestions would be
welcome...
--thanks