fatfishmatt
Programmer
Is there a way with PHP to query a result set rather than query the database, similar to the <cfquery dbtype="queryName"> tag in ColdFusion?
I have a database with around 10,000 records, each record having a country, state, city field etc.
The user selects the country from a drop down list. The code then querys all 10,000 records in the database and returns a result set of records in that country giving the option for the user to now select a state.
The user then selects the state and the code querys 10,000 records again and returns records with the matching country and matching state.
What I'd like to do in the second instance is instead of query the full 10,000 records again on Country & State, is query result set of the first query (which could be as little as 15 or 20 rather than 10,000) on just State.
And again in the third instance I'd like to query the second result set (which could be as little as 5 or 6 records) on City rather than the full 10,000 again on Country, State & City.
Thanks for the help in advance...
I have a database with around 10,000 records, each record having a country, state, city field etc.
The user selects the country from a drop down list. The code then querys all 10,000 records in the database and returns a result set of records in that country giving the option for the user to now select a state.
The user then selects the state and the code querys 10,000 records again and returns records with the matching country and matching state.
What I'd like to do in the second instance is instead of query the full 10,000 records again on Country & State, is query result set of the first query (which could be as little as 15 or 20 rather than 10,000) on just State.
And again in the third instance I'd like to query the second result set (which could be as little as 5 or 6 records) on City rather than the full 10,000 again on Country, State & City.
Thanks for the help in advance...