when is the right time to close a MySQL database?
Posted 11 July 2006 - 12:07 PM
But i'm really confuse when is the right time to close it after opening?
PLease if you have a bright answer and detailed and smart explaination for
this please don't hesitate to share it to me, because i want to know it.
Thank you very much.
Posted 11 July 2006 - 12:10 PM
<?php $conn = mysql_connect(.....); $conn = mysql_query($sql....); //Use the database again $x = getArticles($conn); //Now we'll output html, no need for mysql mysql_close($conn); renderHtml($x....); ?>
Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd
Posted 11 July 2006 - 12:26 PM
Posted 11 July 2006 - 12:28 PM
And I used pconnect (persistent connection) instead of connect.
Personally, I don't see any security issue with that.
Posted 11 July 2006 - 04:49 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users