开发者

pdo free result

开发者 https://www.devze.com 2023-03-07 06:53 出处:网络
there is a mysql function in php called mysql_free_result(); I couln\'t find any similar function for PDO.

there is a mysql function in php called mysql_free_result(); I couln't find any similar function for PDO.

is there a pdo function to free the result of a database fetch or does the result set automatically get requested and freed when I call $stmt->fetch() data?

cou开发者_如何学JAVAld someone explain me this difference between native mysql and pdo?


closest method is close cursor for PDO statements.

http://us.php.net/manual/en/pdostatement.closecursor.php

$stmt = $dbh->prepare('SELECT foo FROM bar');
$stmt->closeCursor();


You can set the object variable to null. The GC will destroy the PDO Statement instance, I guess.

0

精彩评论

暂无评论...
验证码 换一张
取 消