Because you are enclosing your $sql string within () brackets, $sql is being set a boolean value, not the value of the string.
Change it to $sql = "SELECT * ... '$group_id'"; -Mike Dan McCullough wrote: >Warning: Supplied argument is not a valid MySQL result resource in >/home/sites/projects.heathermccullough.com/web/copeland/product.php on line 61 > >Here is the code, I fixed it once, and I cant figure out why it keeps returning. > >if ($submit) { >$sql = ("SELECT * FROM store WHERE state = '$State' AND groups = '$group_id'"); >$result = mysql_query($sql); >if(mysql_num_rows($result) > 0) { < - line 61 > while ($stores = mysql_fetch_array($result) ) { > $store_name .= "".$stores["name"]." <br> ".$stores["address"]." <br> >".$stores["city"].", >".$stores["state"]." ".$stores["zip"]."<br>".$stores["phone"]." <br><br> "; > } >} else { >$store_name .= "Copeland Furniture Company Store<br>Main Street<br>Bradford, Vermont >05033<br>802-222-5300<br><a href=\"http://www.copelandfurniture.com/companystore\" >target=\"new\">Copeland Furniture Company Store</a>"; >} >MYSQL_CLOSE(); > >===== >Dan McCullough >------------------------------------------------------------------- >"Theres no such thing as a problem unless the servers are on fire!" >h: 603.444.9808 >w: McCullough Family >w: At Work > >__________________________________________________ >Do You Yahoo!? >Find the one for you at Yahoo! Personals >http://personals.yahoo.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]