Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

analyze entered search 1

Status
Not open for further replies.

DotNetGnat

Programmer
Mar 10, 2005
5,548
IN
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
 
jpadie,

Thank you for guiding me in the right direction. I appreciate it. Have a star.

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top