Page 1 of 1

PHP data into chained selects.

Posted: Mon Sep 17, 2007 11:21 am
by compphenom
I have a methodology question of what the proper way to do this online. I am coding a website in PHP. I plan to have a chained select to function similar to the one here: http://www.dynamicdrive.com/dynamicinde ... /index.htm

I would narrow down from State -> City -> Local Politician. Needless to say this will be a huge database with 10's of thousands of records eventually so there are performance issues to thing about. How should I go about doing this?

Here are a couple of thoughts I had:

1. Pull down "SELECT * from DBname" into the page (would this be a huge performance hit?), build out the selects and use javascript and/or CSS to enable/disable the selects and populate them with the correct data (like in the dynamic drive example above).

2. Pull Down "SELECT STATE from DBname", then (not exactly sure how to do this) refresh the page pulling down "SELECT CITY from DB" finally refresh the page again using "SELECT PoliticianName"


Thanks for anyone's thoughts. If you could point me in the right direction of an article, tutorial, code samples, ideas, etc about this topic please let me know!

- Kevin

Posted: Mon Sep 17, 2007 12:39 pm
by Christopher
Here is a recent post that may have some information of interest:

viewtopic.php?t=60287

Posted: Tue Sep 18, 2007 2:35 am
by Kieran Huggins
Sounds like a job for AJAX if ever I've heard one...