php pdo 免费结果
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6084396/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
pdo free result
提问by Timo Huovinen
there is a mysql function in php called mysql_free_result(); I couln't find any similar function for PDO.
php中有一个mysql函数叫做mysql_free_result();我找不到 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?
是否有一个 pdo 函数来释放数据库获取的结果,或者在我调用$stmt->fetch()
数据时是否会自动请求并释放结果集?
could someone explain me this difference between native mysql and pdo?
有人可以向我解释一下本机 mysql 和 pdo 之间的区别吗?
采纳答案by dqhendricks
closest method is close cursor for PDO statements.
最接近的方法是关闭 PDO 语句的游标。
回答by Stijn Leenknegt
You can set the object variable to null. The GC will destroy the PDO Statement instance, I guess.
您可以将对象变量设置为 null。我猜 GC 会破坏 PDO Statement 实例。