Re: warning

From: Date: Tue, 17 Oct 2000 13:25:05 +0000
Subject: Re: warning
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20630@lists.php.net to get a copy of this message
Tony: > $sql = "select * from some_table where ID=$ID"; > $results = mysql_query($sql); > $array = mysql_fetch_rows($results); It's best to copy and paste your exact code into your messages. For example, mysql_fetch_rows() isn't really a function. > above code is working perfectly, but it gives following warning: > Warning: Supplied argument is not a valid MySQL result resource in > ./mysql.php3 on line 166 Then it's not working perfectly. That's the error I get when my query has a mistake in it. Place the following line after your mysql_query() call: echo "<h3>MySQL Error: " . mysql_error() . "</h3>\n"; That will tell you what's going on. Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#20630) next »