2020-06-06, 07:39 AM
was wondering when should we use $db->free_result?
thanks
thanks
When to use $db->free_result?
|
2020-06-06, 07:39 AM
was wondering when should we use $db->free_result?
thanks
2020-06-06, 08:19 AM
I'd say it is best practice to always use it, but I personally don't. Read the following:
https://stackoverflow.com/a/2502228
2020-06-06, 05:04 PM
(2020-06-06, 08:19 AM)Omar G. Wrote: I'd say it is best practice to always use it, but I personally don't. Read the following: thx!
2020-06-06, 11:20 PM
free_result() is like testing... you use it when you're unsure of your code. You can't be a guru if you test or if you free resources
Seriously, I never use free_result(), PHP & MySQL do it for me (cross fingers), I know I have to use it to follow best practices. Queries in plugins are rarely so heavy that they need to be freed, but if everybodies think that, troubles may arrive. I'll try use it in next plugins / evolutions. P.S.: I'm still not going do tests on my developments |
« Next Oldest | Next Newest »
|