RE: [PHP] help with mysql querry Followup V2
| From: | Kurth Bemis | Date: | Tue, 01 Aug 2000 20:38:04 +0000 |
| Subject: | RE: [PHP] help with mysql querry Followup V2 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9544@lists.php.net to get a copy of this message | ||
At 03:06 PM 8/1/2000 -0400, Craig Vincent wrote:
hrm....i see the logic...duh :-)
but i still can't get it to say no homes blah blah.....i did the algorithm out on paper and i still can't see where its wrong...
if you look at the page (http://www.jrehomes.com/test/test.php) and then tell it that you only want homes that have 1 bathroom...you'll what i mean when i say it dosen't work.
source at http://www.jrehomes.com/test/test.phps
~kurth
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 == "")){Kurth Bemis - Senior Linux Network/Systems Administrator, USAExpress.net kurth@usaexpress.net http://www.usaexpress.net/kurth ICQ - 6624050 Call Sign - N1TYW PGP key available - http://www.usaexpress.net/kurth/pgp Fight Weak Encryption! Donate your wasted CPU cycles to Distributed.net (http://www.distributed.net)$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 ------------------------- -- 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