Connecting Tech Pros Worldwide Forums | Help | Site Map

how to search data more than one criteria?

Newbie
 
Join Date: Feb 2007
Location: malaysia
Posts: 14
#1: Mar 17 '08
how to solve???

i want to search data for more than 1 criteria in one interface.for example,i want to search location,price and type.then, i want use drop down list for select each criteria and when i click the search button, the result will display.

for information,i develop my program use dreamweaver wizard.so how to solve this problem?

TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 914
#2: Mar 17 '08

re: how to search data more than one criteria?


I recommend doing it in stages, so make some sort of loop:
Find all for CRITERIA1 --> Store results in array (eg. RESULTS1)
Find all for CRITERIA2 in RESULTS1 --> Store results in array (eg. RESULTS2)Find all for CRITERIA3 in RESULTS1 --> Store results in array (eg. RESULTS3)
etc...
Display RESULTS1

Please post code so we can give you a hand with that instead of guessing what you want exactly.
ak1dnar's Avatar
Moderator
 
Join Date: Jan 2007
Location: Colombo
Posts: 1,440
#3: Mar 17 '08

re: how to search data more than one criteria?


Quote:

Originally Posted by hazahafiz

how to solve???

i want to search data for more than 1 criteria in one interface.for example,i want to search location,price and type.then, i want use drop down list for select each criteria and when i click the search button, the result will display.

for information,i develop my program use dreamweaver wizard.so how to solve this problem?

There were few threads on this topic on the php forum. Please do a search first. "dependent drop down" would be OK, make sure to search in php forum from here http://www.thescripts.com/forum/search.php
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#4: Mar 17 '08

re: how to search data more than one criteria?


Also, define where you want to search. That makes quite a difference in setup.
Do you want to search websites, local files, databases, ??

Ronald
Reply