Sr. PHP Programmer Question:
Download Questions PDF

How will you close a MySql database using PHP?

Answer:

Its simplest function mysql_close PHP provides to close a database connection. This function takes connection resource returned by mysql_connect function. It returns TRUE on success or FALSE on failure.

bool mysql_close ( resource $link_identifier );

If a resource is not specified then last opend database is closed.

Download Senior PHP Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
What is PEAR?Difference between mysql_connect and mysql_pconnect?