SELECT fv_thread.threadid AS threadid, bb_building.id, bb_voivodeship.name AS voivodeship_name, bb_county.name AS county_name, bb_city.name AS city_name FROM bb_city, bb_county, bb_voivodeship, fv_thread LEFT JOIN bb_building ON fv_thread.typeid=bb_building.id WHERE fv_thread.city=$id AND bb_building.city=bb_city.id AND bb_city.county=bb_county.id AND bb_county.voivodeship=bb_voivodeship.id
Ma ktoś pomysł/wiedze co jest nie tak?