Help implementing small search for my application

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
houssam_ballout
Forum Newbie
Posts: 1
Joined: Wed Oct 05, 2011 7:24 am

Help implementing small search for my application

Post by houssam_ballout »

Hello,
I had a small php , mysql application & I need to include the search to it.

example of search below:

By driver:

Driver 1
Driver 2
Driver 3

By Time:
Morning
Evening
Noon

By Level:
Level 1
Level 2...

each one is a checkbox so any help on how to implement this search?
Thanks in advance
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Help implementing small search for my application

Post by social_experiment »

Will each of the options by included in a single search? If so, the search query could look similar to the example below

Code: Select all

SELECT * FROM table WHERE driver = 'chosenDriverOption' AND time = 'chosenTimeOption AND level = 'chosenLevelOption'
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply