![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Aug 2003
Location: Canada
Posts: 2,310
|
![]() 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 column: city_name = Vancouver, Victoria, Edmonton column: province_id = 9, 9, 8 Table: province column: id = 8, 9 column: name = Calgary, British Columbia |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: May 2011
Location: San Diego
Posts: 328
|
SELECT city_name FROM city WHERE province_id IN (SELECT province_id FROM city WHERE city_name = $city) ???
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Aug 2003
Location: Canada
Posts: 2,310
|
That worked thanks!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jun 2005
Posts: 533
|
If you ever need major coding help contact me anytime!
__________________
Promote our penis growth and acne books, earn 75% on sales and rebills. Contact me if you want a custom backend like Pornstarbucks and Freenetpass integrated with any billing gateway: |
![]() |
![]() ![]() ![]() ![]() ![]() |