How can I make plural/singular words pull all forms?
Example: If a person searches for "mens rings" how can I check the data base to see if any of the fields contain mens, men, men's, ring, rings, etc.?
How can I make plural/singular words pull all forms?
Example: If a person searches for "mens rings" how can I check the data base to see if any of the fields contain mens, men, men's, ring, rings, etc.?
It dosn't seem that using LIKE would be the best approach for what you need. I would look into MySQL FULLTEXT indexing to get the basic functionality working. I'll have to look into the plural thing a bit more to see if that can be accomplished.
Take a look at these two links for FULLTEXT indexing info.
Here is a snippet from the second article:
SELECT headline, story FROM news
WHERE MATCH (headline,story) AGAINST ('Hurricane');
UPDATE:
I found this SO post in which a comment seems to suggest that the FULLTEXT indexing will take plural and grammatical forms into account but he dosn't cite a source, so it's hard for me to say for sure. Can you try the FULLTEXT indexing method?