开发者

pdo free result

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜