Welcome to the OzoneAsylum FaqWiki
Frequently Asked Questions
Server Side Coding
MySQL

How do I create a keyword search in MySQL? Pages that link to <a href="https://ozoneasylum.com/backlink?for=5481" title="Pages that link to How do I create a keyword search in MySQL?" rel="nofollow" >How do I create a keyword search in MySQL?\

You need to use something like:

code:
LIKE '%$search%'



and there are many alternatives like using REGEXP for regular expression-based searching.

Note: LIKE is case insensitive.

---------------------------
Relevant links:

String Comparison Functions - explains the LIKE syntax.

MySQL Full-text Search - explains another possible approach using MATCH and AGAINST.

---------------------------
Relevant FAQs:

How do I do a search and replace on entries in my MySQL database?

________________________
Emperor

(Added by: Emperor on Mon 09-Dec-2002)

(Edited by: Emperor on Tue 08-Jul-2003)

« BackwardsOnwards »

Show Forum Drop Down Menu