Menu

#11 "Library routine called out of sequence"

open
nobody
None
5
2008-07-23
2008-07-23
Anonymous
No

<?
$db = sqlite3_open('info.db');
$a = sqlite3_query($db, 'select * FROM info');
while ($r = sqlite3_fetch_array($a))
{
print_r($r);
}
sqlite3_query_close($a);
sqlite3_close($db);

unset($db); // <--- if don't use, we will got bug when trying to execute sqlite3_query or sqlite3_exec

$db = sqlite3_open('cache.db');

echo $db, "\n\n";

$a = sqlite3_query($db, 'select * from cache;');

while ($r = sqlite3_fetch_array($a))
{
print_r($r);
}
sqlite3_query_close($a);
sqlite3_close($db);
?>

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.