Search select statement
- by Nana
I am creating a page which would have different field for the user to search from.
e.g. search by:
Grade: -dropdownlist1-
Student name: -dropdownlist2-
Student ID: -dropdownlist3-
Lessons: -dropdownlist4-
Year: -dropdownlist5-
How do I write the select statement for this? Each dropdownlist would need a select statement which would extract out different data from the database.
But, I want to write ONE select statement which can dynamically choose the dropdownlist options. Instead of writing many many select statement.
Lets say;
Grade: -dropdownlist1- ; default value(all)
Student name: -dropdownlist2-; default value(all)
Student ID: -dropdownlist3-; 0-100 is choosen
Lessons: -dropdownlist4-; A-C is choosen
Year: -dropdownlist5-; 2009 is choosen