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.
精彩评论