开发者

Why should I free the result of PHP and MySQL?

Why should I free the result of PHP and MySQL using mysql_free_result()?

And what is the difference whether I free开发者_运维问答 the result or not?

Should I always free the result from a MySQL query result specially in CRUD?

Thanks for answering my questions?


Freeing results in PHP is more or less to tell both the server and PHP to drop the resultset returned from a query. It is sort of a mean to free up memory especially when you have many queries or queries that return large resultsets.


On exit, your script cleans up your results automatically. In a web environment it's only necessary if you've extremely limited memory constraints.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜