Menu

#2 sqlite3_seek()

open
nobody
5
2006-04-26
2006-04-26
No

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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.