Reputation: 792
I am trying to find the value in db row, that include percentage sign.
For example, there is a value of a row "reduced by 10%".
I need to filter results that have "10%" in them, not just "10".
I was trying to
SELECT name, MATCH(name) AGAINST('10\%') AS score
FROM mytable
ORDER BY score DESC
But it returned all the results with "10".
Any ideas?
Upvotes: 1
Views: 1490
Reputation: 11308
Try the following:
SELECT name, MATCH(name) AGAINST('+10\%' IN BOOLEAN MODE) AS score
FROM mytable
ORDER BY score DESC
Upvotes: 1