php - What are the rules for closing prepared statements? -


i'm using sqlite3 class php. i've noticed sqlite3stmt::close() sqlite3result::finalize().

is essential call these functions? i'm having bit of trouble calling them because don't know when they're no longer being used in database wrapper class have return sqlite3result

for example:

function execsomething(){   $stmt = $db->prepare($sql);   return $stmt->execute(); } 

should close prepared statement?

i don't know when they're no longer being used in database wrapper class

can create destructor on php wrapper class calls these methods? when wrapper object destroyed php's garbage collector you'll know statements/results no longer used.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -