iu have table for country with fields of code and country while i do have again a table for city with the fields of code, city, ctryCode
well the reason i have a ctryCode on my city coz when i search something on the city it will going to display the value of the country assigned too.
the problem is like this..
$sqlQry = mysql_query("select * from tbl_City, tbl_Country where tbl_City.ctryCode=tbl_Country.code");
print mysql_error();
$numrows = mysql_num_rows($sqlQry);
if ($numrows >0){
while ($hrow = mysql_fetch_array($sqlQry)) {
$code = $hrow["code"];
$city = $hrow["city"];
$country = $hrow["country"];
print $code.'<br>'.$city.'<br>'.$country
}
}
the problem is that i am printing the value of the code and apparently the code is coming from tbl_Country so why this get the value of code from country while i select first the value of code from tbl_City
pls need help on this..
thank you