Code: Select all
$GetHouses = mysql_query("SELECT houses.*, cities.*, countries.* FROM houses, cities, countries WHERE houses.userID ='{$_SESSION['Current_User']}' AND cities.cityID = houses.cityID AND cities.countryID = countries.countryID.") or die(mysql_error());
Query Problem[SOLVED]
Moderator: General Moderators
Query Problem[SOLVED]
I have a problem with my query, i must have some structure wrong here but i cannot see where i have gone wrong... can any one see where i have gone wrong ?
Last edited by SirChick on Fri Aug 24, 2007 10:54 am, edited 1 time in total.
i managed to get it fix (kinda).
i changed it to this:
"Houses Not found!"
Not sure what to do from here
i changed it to this:
and got this in return:Code: Select all
$GetHouses = mysql_query("SELECT houses.*, cities.*, countries.* FROM houses, cities, countries WHERE houses.UserID ='{$_SESSION['Current_User']}' AND cities.CityID = houses.CityID AND cities.CountryID = countries.CountryID") or die(mysql_error()); // Fetch the row from the database if (!($gethouserow = mysql_fetch_assoc($GetHouses))) { echo "Houses Not found!"; exit; }
"Houses Not found!"
Not sure what to do from here