Imagine the simple snippet below:
<?
mysql_close();
?>
This will obviously output the following warning (may look different depending on what version of php_mysql(i) you are using):
mysql_close(): no MySQL-Link resource supplied in .....
As there is no link open.
Is there a way in php to test if a mysql link is already established or not?
Thanks!
Note, have been getting a few comments regarding the use of mysql_close(). I just used that as an example. Furthermore, there are (many) situations when the use of mysql_close() is appropriate.