And uncommon but useful feature of MySQL includes selecting the results of a conditional or boolean expression.

E.g., say you have a Users table where you’re tracking if the user is actually logged in, and whether he wants to be shown as logged in, but don’t want to show both values in the response. You could get back that state with an expression like so

	(users.logged_in = 1 AND users.visible = 1) AS online
FROM users
WHERE something = :whatever

Obviously you can pass functions as well… If you want to check if more than 10 users are viewing or participating in some page or component, you could use something like this:

FROM population
WHERE something = :whatever