Re: Warning
| From: | Matthew Ballard | Date: | Sat, 09 Dec 2000 22:19:46 +0000 |
| Subject: | Re: Warning | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29503@lists.php.net to get a copy of this message | ||
Typically that error means that there was something wrong with your query, not with your PHP code itself. In this case, it probably because you don't have an and (or some other operator) to relate the zip and email checks, so it should be:
zip='$Zip' and email='$Email'
Matthew
At 01:07 PM 12/9/2000 -0500, you wrote:
Hi, Anyone know why I keep getting a Warning: 0 is not a MySQL result index ----- on line 11 in this code?? <? $host="localhost"; $user=""; $passwd=""; $dbase=""; $Selstmt = "SELECT zip, email FROM OK WHERE zip='$Zip' email='$Email'"; $dbh=mysql_connect($host, $user, $passwd); $query=mysql_db_query($dbase, $Selstmt); $num_rows=mysql_num_rows($query); mysql_close(); if ($num_rows == 0) { echo "Hi"; } else { echo "Nihg"; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net