From: Roderick T. <tho...@ms...> - 2007-03-15 12:51:58
|
$query=3D"SELECT CityID FROM Cities WHERE CityName =3D 'Ann Arbor, MI'";= print "hello"; print "$city_selection"; print "hello"; $result=3Dmysql_query($query); $num=3Dmysql_numrows($result); $i=3D0; while ($i < $num) { global $CityID; $CityID=3Dmysql_result($result,$i, "CityID"); $i++; print "$CityID"; } The above script gives me this output: helloAnn Arbor, MIhello1 Yet, the CityID doesn't show up when I use this query: $query=3D"SELECT CityID FROM Cities WHERE CityName =3D '$city_selection'= "; = |