Re: bug in mysql code?
| From: | Tomas V.V.Cox | Date: | Sun, 24 Jun 2001 19:55:51 +0000 |
| Subject: | Re: bug in mysql code? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-490@lists.php.net to get a copy of this message | ||
Colin Viebrock wrote:
>
> Say you have:
>
> $DB = DB::connect('mysql://user:pass@machine.com/database');
>
> And "database" does not exist, then the above code will spit out:
>
> <b>Warning</b>: Supplied argument is not a valid MySQL-Link resource in
> <b>/usr/local/share/php/pear/DB/mysql.php</b> on line
> <b>437</b><br>
> <br>
> <b>Warning</b>: Supplied argument is not a valid MySQL-Link resource in
> <b>/usr/local/share/php/pear/DB/mysql.php</b> on line
> <b>440</b><br>
>
Probably you are using PHP < 4.0.6 where mysql_error() didn't support
yet this (from Changelog):
Added connection error support to mysql_error() and mysql_errno().
(Jason)
It's now fixed in CVS.
Regards,
Tomas V.V.Cox