Which datatype should I use for a flag (in MySQL)? I just want to check if a user is online at the moment.
I thought about a TINYINT or SET which both could be 0 or 1.
TINYINT
is perfect for what you are suggesting:
`status` tinyint(1) unsigned NOT NULL DEFAULT '0'