How to use an user variables in MySQL LIKE clause?
SET @email = '[email protected]';
SELECT email from `user` WHERE email LIKE CONCAT('%', @email, '%');
You may have error
Error Code: 1267. Illegal mix of collations for operation 'like' 0.016 sec
In this case you need to specify the same collation as used for your table like that:
SET @email = '[email protected]' COLLATE utf8_unicode_ci;