Re: [PHP-DB] mysql_error function

2006-10-06 Thread Honza Spurny
Niel Archer wrote: Hi OK, so there is no way how to get error message about mysql_connect() function when establishing more connections? mysql_error *should* hold the error string from the last used mysql function (excepting itself and mysql_errno), that includes the mysql_connect()

Re: [PHP-DB] mysql_error function

2006-10-06 Thread Niel Archer
Hi OK, so mysql_error is not usable for me in this case. Is in PHP any other way how to get error-message from connect function? Isn't in PHP any other function, that can be used similiar? To the best of my knowledge, there is no work around for this situation. Even the 'Improved' MySQL

[PHP-DB] mysql_error function

2006-10-03 Thread Honza Spurny
Hello, let me ask you something. I have a problem with mysql_error() function after using mysql_connect(). Please look at thiese two examples: Example 1 $link = mysql_connect($host, $user, $pswd) or die(Could not connect to $host because: . mysql_error()); /Example 1 Example 2 $link1 =

Re: [PHP-DB] mysql_error function

2006-10-03 Thread Niel Archer
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