Forum Moderators: coopster

Message Too Old, No Replies

search for words

search words in Mysql with php

         

chunk_split

10:57 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



Hi

I'm trying to write a quick search script which will search for mutiple words in MySQL. The search works fine for one word or if the words are in sequence or phrase.

I've tried taking the entered form string and using explode to split the string by spaces, then using foreach to query the database.

stargeek

11:06 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



i assume you are using the LIKE syntax
search mysql.com for MATCH AGAINST syntax, this will probably be what you want.

jatar_k

11:07 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



and Welcome to WebmasterWorld chunk_split ;)

chunk_split

11:19 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



Sorted, Thanks!