PDO->bindParam, PDO->bindValue and PDO->closeCursor

squale323

New Member
So far I have been using \[code\]PDO->bindParam\[/code\] however while reading the manual I found \[code\]PDO->bindValue\[/code\] from what I can tell \[code\]PDO->bindValue\[/code\] passes by value where as \[code\]PDO->bindParam\[/code\] passes by reference, is this the only difference?\[code\]$modThread = db()->prepare("UPDATE `threads` SET `modtime` = UNIX_TIMESTAMP( ) WHERE `threadid` =:id LIMIT 1");while(something){ $modThread->bindParam(':id', $thread); $modThread->execute();//*******************HERE********************//}\[/code\]Again while reading the manual I found: \[code\]PDO->closeCursor\[/code\] should I place it where marked? Is it optional/automatically called? Seems only certain drivers need it. Will calling it on a driver that doesn't need/support it cause errors? How about MySQL?
 
Back
Top