Can someone tell me when you, for example, update, paste, delete .. if you then close it, like mysqli_stmt::close(); ? I checked the PHP manual and did not understand what close() actually does.
Example:
$stmt = $dbh->prepare("SELECT `user_email` FROM `users` WHERE `user_email` = ? LIMIT 1"); $stmt->execute(array($email)); $stmt->close();
The next part of my question: if as an example I had several update requests in a transaction after each execute() for every request that I execute in a transaction should I close them separately? ... because this transaction is not necessary, I need to use $stmt->close(); after each execute (); or just use one $stmt->close(); after all of them?
php mysqli
PHPLOVER Apr 14 '12 at 23:25 2012-04-14 23:25
source share