mysqli - Do I really need to do $result->close(); & $mysqli->close();?

后端 未结 4 471
逝去的感伤
逝去的感伤 2020-12-13 06:44

Just started using mysqli. If I\'m working with small data sets on small websites (traffic-wise), do I really need to use these all the time?

$result->clo         


        
4条回答
  •  攒了一身酷
    2020-12-13 06:59

    You should get in the habit of doing cleanup right (calling close as soon as you're done), or the resource leaks can gradually accumulate until they impact performance.

    As far as what DB layer, learning PDO should be worthwhile because it is well-designed and compatible with all the major databases.

提交回复
热议问题