RE: [PHP-DB] Problem with php and mysql

From: Date: Sat, 30 Sep 2000 19:31:41 +0000
Subject: RE: [PHP-DB] Problem with php and mysql
Groups: php.db 
Request: Send a blank email to php-db+get-3188@lists.php.net to get a copy of this message
What is $Toto? what does the MySQL log show? Try doing : $rtest = mysql_db_query("test",$test) or die(mysql_error()); Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. > -----Original Message----- > From: Emmanuel Halphen [mailto:manu@halphen.net] > Sent: Saturday, September 30, 2000 8:21 PM > To: php-db@lists.php.net > Subject: [PHP-DB] Problem with php and mysql > > > Hi, > > > I have a little problem with php and MySQL. > > This is an extract of the code of my page : > > $test = "SELECT * FROM Test WHERE $Toto <> 1"; > $rtest = mysql_db_query("test",$test) > while($etest = mysql_fetch_array($rtest)) { > echo $etest["Numero"]; > } > > While I execute this page, I have the following error : > > Warning: Supplied argument is not a valid MySQL result resource > > When I put in the code : echo $rtest; , I have the following > response : > Resource id #2 > > Does somebody has an answer or an explication ? > > > Thanks a lot. > > > Emmanuel > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.db (#3188) next »