I'm confused
Posted: Thu Dec 16, 2004 8:19 am
patrikG | Help us, help you. Please use
The code always returns 99 for $zone. When I view $filtercode later on in the script, there's nothing there. When I view $getZONE, all I get is "SELECT zone FROM zones".
Could someone shed some light on this and get me out of the dark? I can't see the forest right now because there are too many trees in the way.
patrikG | Help us, help you. Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Below is a snippet of code that has me confused.Code: Select all
$filterCode = "WHERE city = '$city' and state = '$st'";
$getZONE = "SELECT zone FROM zones $filtercode";
$getCount = mysql_query( $getZONE );
$countnum = mysql_num_rows( $getCount );
if ($countnum == 0) {
$zone = 99;
} else {
$zone = mysql_query( $getZONE );
}Could someone shed some light on this and get me out of the dark? I can't see the forest right now because there are too many trees in the way.
patrikG | Help us, help you. Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]