note 43479 deleted from function.mysql-error by tomsommer
| From: | tomsommer@php.net | Date: | Tue, 22 Jun 2004 19:13:09 +0000 |
| Subject: | note 43479 deleted from function.mysql-error by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71515@lists.php.net to get a copy of this message | ||
Note Submitter: com dot pineappletechnologies at info
----
Keep in mind when trying to get the error message from a failed mysql_(p)connect() call, you
can't specify the link_identifier resource, since it will not be valid.
<?php
$link = mysql_connect('localhost', 'wrong_username',
'wrong_password');
if( !$link )
{
// No arguments -
echo mysql_error();
}
?>