pdo free result

mysql, pdo, php

Solution

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();

Problem

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? could someone explain me this difference between native mysql and pdo?

Original source