Reputation: 20163
Example
Names in database:
-Sopa de pescado
-Sopa de tomate
if i search for:
"Sopa" -> 2 results
"pescado" -> 1 result
"sopa" -> 0 results :(
how can i fix?
Upvotes: 0
Views: 563
Reputation: 7790
You can use LOWER() function in WHERE part of your query. See here for function details.
Also, you may use COLLATION operator. In this case query will look in the following way:
SELECT *
FROM
table
WHERE
col_name COLLATE latin1_general_ci LIKE '%sopa%';
See here for details.
Upvotes: 1
Reputation:
You can convert all your search queries to lowercase and then use a query like this
SELECT * FROM Table_Name WHERE LOWER(Column_Name) LIKE '%pescado%';
Upvotes: 2