I have a table like this:
CREATE TABLE IF NOT EXISTS `session` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`token` varchar(32) NOT NULL,
`profile` varchar(1000
In MYSQL, FALSE is not a boolean value, it's an integer, more specifically zero. In fact, MySQL does not have boolean column types (it has BOOL and BOOLEAN but they're mere aliases for TINYINT). So your query is a synonym for:
SELECT * FROM session WHERE token = 0
Since token is a VARCHAR, MySQL needs to convert your strings to number. Run this query and you'll get an idea about the rules:
SELECT
0 + "0001",
0 + "123abc",
0 + "abc123"
As a result, fa356333dd3ee8f1b18b8bf0a827e34c casts to 0 because it starts with a letter, thus the match.