I have a table named user like below:
id || email
---------------------------------
1 || someone@foo.bar
---------------------------------
2 || 1manwithblueshirt@bar.foo
---------------------------------
Why is this:
1manwithblueshirt@bar.foo
result of this search?
SELECT * FROM user WHERE email = 1
Because MySQL decides to convert the email to an integer. The rules are to convert leading characters to a number, until the characters are not valid numbers.
Here is a simple example: