When I fetch the records from the LIKE the query returns no results but when I fetch records from the equal to (=) then the query returns results.
Following user name are stored in the database:
(1) `~@#$%'\|/?.><^&%@()-_+-:
(2) (){}[]|\/?"*&^%$#@sujeet`
I am searching the records from the LIKE operator as the following ways:
(1)
SELECT * FROM user WHERE user LIKE '%`~@#$%''\\|/?.><^&%@()-_+-:%'
(2)
SELECT * FROM user WHERE user LIKE '%(){}[]|\\/?"*&^%$#@test`%'
And I am fetching the records from the equal to (=) operator as the following ways:
(1)
SELECT * FROM user WHERE user = '`~@#$%''\\|/?.><^&%@()-_+-:'
(2)
SELECT * FROM user WHERE user = '(){}[]|\\/?"*&^%$#@test`'
But when I am fetching the records from the LIKE operator the the query returns no results and when I am fetching records from the equal to operator then the query returns results. Both of the SQL query is shown above.
Please suggest how I will solve this problem.
Thank You
Sujeet.