Re: Re: [PHP General] RE: Problems with MySQL-Link [3:14370:14592]
| From: | Berthold | Date: | Thu, 31 Jan 2002 12:42:13 +0000 |
| Subject: | Re: Re: [PHP General] RE: Problems with MySQL-Link [3:14370:14592] | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82916@lists.php.net to get a copy of this message | ||
Hi!
mysql_error returns nothing...
The error arrives while selecting the database via:
$link = mysql_connect("host","user","passwd");
mysql_select_db("bla", $link);
echo $link returns always '1'!
David Robley wrote:
In article <3C58FE54.6020903@gmx.de>, b.tenhumberg@gmx.de says...-- BertholdSo, I've testet all possible I found in my brain... CGI or Apache module: same error mysql_connect or mysql_pconnect: same error Variing settings in php.ini: same error How can I solve that problem? BTW: Here I describe it again: Connecting to a database works well: ok Working with that database: ok Using the additional $link-Parameter: false Not a valid resource id ... And it does not matter how many different links with different servers I use! The resource-id is always '1'. Strange...Not a valid resource ID usually means a problem with the query - in fact this might be in the FAQ. Use mysql_error() after the database query to see if mysql returns a useful error.