php - multiple MySQL queries across a web page layout - best way to go about it? -


Basically I want to know if every database query is better than before setting up a database connection, and then use mysqli_close (). Use the mysqli_close () near the end of the file, immediately after the relevant section for each location in the layout, where to draw the database information - or if opening the database connection at the beginning of the file.

One request per connection is more efficient if you make several concurrent updates on the same lines, then it is important That is, you make fast (positive) connections as fast as possible.


Comments