Re: PHP 4.0 Bug #6698 Updated: Resource id #1 on $mysql_link

From: Date: Wed, 13 Sep 2000 11:02:40 +0000
Subject: Re: PHP 4.0 Bug #6698 Updated: Resource id #1 on $mysql_link
Groups: php.dev 
Request: Send a blank email to php-dev+get-33159@lists.php.net to get a copy of this message
> You can check if connection was established like this: > > > > $mysql_link = mysql_connect("195.154.245.142","root",""); > > if(!$mysql_link) { > > die("ERROR: No connection!"); > > } > I'm sorry but it doesn't work....I have : if (!$mysql_link) { die("ERROR: No connection!"); } else { mysql_select_db("demo",$mysql_link); $query = "SELECT * FROM DISTRIBUTEURS"; $mysql_result = mysql_query($query,$mysql_link); $affected_rows = mysql_affected_rows($mysql_link); $fields = mysql_num_fields($mysql_result);. ... and I get : <b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>/usr/local/etc/terravirtual/htdocs/newkertel/inscr_inscription1.php</b> on line <b>368</b><br> it doesn't die....

« previous php.dev (#33159) next »