From: matt d. <mm_...@ya...> - 2007-03-15 13:58:11
|
while($rs =3D mysql_fetch_array($result)){=0Aecho $rs[cityID] . "<br>";=0A}= =0A=0Aalso try-=0ACityName like '%$city_selection%';=0A=0A=0A----- Original= Message ----=0AFrom: Roderick Thomas <tho...@ms...>=0ATo: chiphpug-dis= cu...@li...=0ASent: Thursday, March 15, 2007 6:51:49 AM=0ASu= bject: [chiPHPug-discuss] script question=0A=0A=0A$query=3D"SELECT CityID F= ROM Cities WHERE CityName =3D 'Ann Arbor, MI'";=0A=0Aprint "hello";=0Aprint= "$city_selection";=0Aprint "hello";=0A=0A$result=3Dmysql_query($query);=0A= $num=3Dmysql_numrows($result);=0A$i=3D0;=0A=0Awhile ($i < $num)=0A{=0Agloba= l $CityID;=0A$CityID=3Dmysql_result($result,$i, "CityID");=0A$i++;=0Aprint = "$CityID";=0A}=0A=0AThe above script gives me this output:=0AhelloAnn Arbor= , MIhello1=0A=0AYet, the CityID doesn't show up when I use this query:=0A$q= uery=3D"SELECT CityID FROM Cities WHERE CityName =3D '$city_selection'";=0A= =0A=0A=0A------------------------------------------------------------------= -------=0ATake Surveys. Earn Cash. Influence the Future of IT=0AJoin Source= Forge.net's Techsay panel and you'll get the chance to share your=0Aopinion= s on IT & business topics through brief surveys-and earn cash=0Ahttp://www.= techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV=0A____= ___________________________________________=0AchiPHPug-discuss mailing list= =0Ac...@li...=0Ahttps://lists.sourceforge.net/l= ists/listinfo/chiphpug-discuss |