As in title:
Using deamweaver 11.5 build 5315
If you create a connection through the GUI, rather than coding it yourself, it uses the mysql_pconnect() function to connect to the database.
Later, when you include this connection file on one of your pages and run a query, it adds mysql_free_result() calls to the bottom of the page but doesn’t add a mysql_close() call for the persistent connection it opened earlier.
This managed to bring down a site I’m developing with only about 4 people using it until I noticed the ‘p’ in mysql_pconnect()
So is this something I’ve done wrong or does Dreamweaver do this on purpose, and when / how does it clean up the connection if ever?
EDIT: and is it best practise or not (I’m thinking not)?
EDIT: dreamweaver 11.5 not 1.5, sorry
mysql_pconnect makes a persistent connection.
mysql_connect makes a “normal” connection, where the socket is closed when the script is finished.
If you are making a lot of queries in a small amount of time, you should go with mysql_pconnect. However if that is not the case, you should stick with mysql_connect.