What are you searching? Or what are you searching for? A keyword in text column, a postal code, telephone number...?
And Welcome to WebmasterWorld, dip00dip.
willis1480
12:45 pm on Nov 10, 2004 (gmt 0)
if you are searching text, use MATCH(full_text_index) AGAINST('phrase or word'). I currently use this in a site search and it works a little funky. Not sure how it determines how good the matches are, but it is better than what I had before. The URL given a couple of posts earlier is about this.
If you are searching just a column like zip_codes, then just use simple LIKE comparison.
NOTE: The match will only match words of 4 characters and more.
lazydog
2:24 pm on Nov 10, 2004 (gmt 0)
NOTE: The match will only match words of 4 characters and more.
You can change this default setting of four characters by adding a line in your my.ini/my.cnf. Here its set to 3 characters-
ft_min_word_len=3
willis1480
7:56 pm on Nov 10, 2004 (gmt 0)
i dont have access to that file, but I still was not aware that that could be changed. Also, I am not sure it is good to match words less than 4 characters. Building my site search, I found that less than four becomes very tricky, especially when dealing with truncating expressions in the plural and such.