RE: [PHP] help with mysql querry
| From: | Craig Vincent | Date: | Tue, 01 Aug 2000 19:06:36 +0000 |
| Subject: | RE: [PHP] help with mysql querry | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9523@lists.php.net to get a copy of this message | ||
> isn't a home that matches the querry in the table. i added
> mysql_num_rows() but i can't get it to work correctly. also...another
Here's your problem
<snip>
$ab = mysql_num_rows($result);
if(($ab < 0) || ($myrow == "")){
$homesx = 0;
}else{
$homesx = 1;
}
</snip>
$ab will never be a negative value (EVER) :) If there are no rows...$ab will
= 0, otherwise it'll be greater than 0....so that if statement will always
be false
if(($ab == 0) || ($myrow == '')){
Sincerely,
Craig Vincent
-------------------------
Senior Programmer
Jazzmonkey Media Inc.
http://www.jazzmonkey.com
-------------------------