MySQLi query results: Best approach, do you close, free, both?

后端 未结 5 1831
小蘑菇
小蘑菇 2021-01-30 07:04

I have some questions about using MySQLi, queries, and related memory management. The code here is just to clarify my questions, so don\'t dump on it for error checking, etc. I

5条回答
  •  感情败类
    2021-01-30 07:32

    Thanks for all the answers, I'd also like to add my experiences of running multiple MySQL queries in one script. Mysqli gave “Commands out of sync” errors after running a query after a MySql procedures with multiple queries. To solve this I had to free all the open result sets using rizwan-mirza's solution to mysqli_free_result() any mysqli_more_results() https://stackoverflow.com/a/25907704/462781

提交回复
热议问题