![]() |
What type of MYSQL JOIN do I need
My old query was:
Code:
$query = "SELECT city_name FROM city WHERE province_id = 9"; $city = $_GET['city']; and just have the city name now but need to fetch all the cities in the province that $city is in. Here are my tables: Code:
Table: city |
SELECT city_name FROM city WHERE province_id IN (SELECT province_id FROM city WHERE city_name = $city) ???
|
That worked thanks!
|
If you ever need major coding help contact me anytime!
|
All times are GMT -7. The time now is 12:39 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123