DotNetGnat
Programmer
Guys,
I am trying to create a search function using php as frontend and mysql as the database.
I have a textbox where users can enter the search criteria and click submit button. using the search criteria, I am planning to write a LIKE query to hit the specific database tables and columns to find the results. Everything looks simple enough but my question is how to analyze the user entered search term.
I mean the user can enter the search criteria in any of the below formats...
examples:
php
mysql
php and mysql
php+mysql
php mysql
and so on...
How to interpret these kind of entries and create the query?
Is there a function that I can use to get the individual keywords and then use them in my query.
Please suggest. Thanks
-DNG
I am trying to create a search function using php as frontend and mysql as the database.
I have a textbox where users can enter the search criteria and click submit button. using the search criteria, I am planning to write a LIKE query to hit the specific database tables and columns to find the results. Everything looks simple enough but my question is how to analyze the user entered search term.
I mean the user can enter the search criteria in any of the below formats...
examples:
php
mysql
php and mysql
php+mysql
php mysql
and so on...
How to interpret these kind of entries and create the query?
Is there a function that I can use to get the individual keywords and then use them in my query.
Please suggest. Thanks
-DNG