I have a site the currently opens and closes a mysqli connection several times when building the page. Is it best to open and close the connections each time you do a query or do one connection at the beginning and use that for all queries of that page and then close the connection at the very end.
If it is a bad idea to have multiple connections why?