Filter Search results?
I am not looking for actual code, more like a tutorial that I could reference and adjust for my own purposes or the name of a plugin that will do what I am trying to do. I have looked online and cannot seem to find what I am trying to achieve. I am probably just not searching for the right name.
I have a mysql database with several columns. I would like to make a search area on the left side of the screen next to the displayed database (the database is displayed with PHP) that would search the database based on the user's search criteria. I would like them to be able to search by name, Date of the week, and also have a keyword search.
The only way I can describe the look of the search area would be to have it look like Walmart's Refine Results (http://www.walmart.com/browse/Computers/Desktop-Computers/_/N-96fg?browsein=true&catNavId=3951&ic=48_0&ref=+428236).
As I said, I have looked online, but can't find anything. Hopefully someone can provide me with a poi开发者_运维问答nt in the right direction.
Well, MySQL's LIKE
operator will work for the "keyword" search. The reference manual can be found at http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html. When you say "name," is this something they type in, or will they select from a list of some sort? Same question goes for the date, I suppose.
Also, what language are you looking to code the app itself in?
AJAX can be used with PHP to create more user-friendly and interactive searches. AJAX can be used for interactive communication with a database.
Results are shown as you type. Results narrow as you continue typing. If results become too narrow, remove characters to see a broader result.
You can use this instead of combobox when a user types a character in the input field some function is triggered by the "onkeyup" event:
like on this http://www.w3schools.com/php/php_ajax_livesearch.asp
And as u want to search data from database u can refer following..
http://www.w3schools.com/php/php_ajax_database.asp
I think proper combination of both will help u to solve ur problem....
精彩评论