Jeri2001
|
| Posted: 10/08/2002, 2:24 AM |
|
I have a statement
$iCount_advertisers = get_db_value("SELECT count(*) FROM pb_advertisers WHERE zone='$pzone' AND topic='$ptopic'");
$pzone and $ptopic have values. Everything is fine except when the count is 0. For some reason $iCount_advertisers does not equal 0. I echo the query and run it in PHPMyAdmin and get 0.
The result is fine except for that one occurence. So I thought of coding if $iCount_advertisers < 1 then $iCount_advertisers == 0. Unfortunately if there are no records this doesn't work.
Any ideas?
Thanks,
Jer
Banging head against wall
|
|
|
 |
Krala
|
| Posted: 10/09/2002, 6:05 AM |
|
Hello,
Check the $iCount_advertisers value before function execute. To track what is working incorrect look at common.php and add print code for the sql execution results.
|
|
|
 |
|