Re: mysql_error function
| From: | Honza Spurny | Date: | Thu, 05 Oct 2006 09:33:35 +0000 |
| Subject: | Re: mysql_error function | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42487@lists.php.net to get a copy of this message | ||
Niel Archer wrote:
> Hi
>
>> The error message for second connection request is not given back to
>> the PHP. Or as I suppose, mysql_error takes last error message from
>> last used ESTABLISHED connection (it means from $link1) and since in
>> this connection was everything ok, it puts empty string as a result
>> of mysql_error function.
>
> This is incorrect. mysql_error() retreives the error message from the
> last mysql function (excluding itself or mysql_errno) executed, not
> the last connection.
>
OK, so there is no way how to get error message about mysql_connect()
function when establishing more connections?
The strange thing is, that it works fine if You use just one connection. In
this case, mysql_error() function can takes error message from the
mysql_connect() function...
>
> Niel