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
Is there any reason you're not testing token is null or token like ''? Comparing a varchar to false is a bad idea regardless of whether the DB will catch your mistake or not... a varchar is never false, and false doesn't equal null.
token is null
token like ''