On Thu, Aug 1, 2013 at 6:33 PM, iccsi <inungh@xxxxxxxxx> wrote: > Thanks for the information and help, > The query can solve server side, but client side, user might select any > one dropdown, for example, user might select manager from drop down without > choose Department dropdown. > > For this case, application needs inject data for supervisor and lower > level, > No, simply prevent client from submitting form until all required fields are filled in. (A blindingly simple procedure). > > Thanks again for helping, > > Regards, > > Iccsi, > > "Jim Giner" wrote in message news:8C.41.29774.C0E5AF15@pb1.**pair.com... > > On 7/31/2013 9:37 PM, iccsi wrote: > >> I have 5 SELECT for Department, Manager, supervisor, Group Leader and >> Employees >> I want to every SELECT list narrow down for an upper SELECT. >> For example, once user select Department then all Manager, Supervisor, >> Group Leader and Employee list will be narrow down by department and >> same for manager and supervisor and so on. >> >> I can use iframe or jQuery to do every level, but it needs to call >> iframe or jQuery to 5 levels. >> I would like to know are there any better way to handle this situation, >> >> Your help and information is great appreciated, >> >> Regards, >> >> >> Iccsi, >> >> How about using just one select and add variables to the where clause? > Set the variable(s) to the values that you want to filter on. > > For ex.: > > your query is > $sel = 1; > $q = "select Department, Manager, supervisor, Group Leader,Employees > where $sel"; > > Then when the user selects a department $d: > > $sel = "Department = '$d'"; > > OR if you have selected a department $d and a manager $m: > > $sel = "Department ='$d' and Manager='$m'"; > > One query. A variable 'where' clause. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >