I’m trying to get a single record from my news feed. I pass it year, month and the news article title. I do the match based where the year = year and month = month and then I use like for the title:
LIKE '%title%'
this works in every case except when the title contains commas. Why doesn’t this:
LIKE '%thank you donors volunteers and guests%'
match what’s in the field: Thank You Donors, Volunteers and Guests
But if I put in the commas:
LIKE '%thank you donors, volunteers and guests%'
it matches it. How can I tell it to match the commas if I don’t know the location of them?
I think you would be best served using boolean full text searches, you can customize your query to your parameters, I won’t write the query for you but you can figure out how to here: http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html