var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Selecting two columns with diffrent WHERE clause
I have to write an private message module, so I create this MySQL schema
id, uid ( who write the message ), subject, message, read ( is read or not ), date
So! I want to display how many are all the messages and how many are unread messages. Is there any way to do that with a single MySQL query?
select count(*) as all_messages
, count(case when read='n'
then 937 end) as unread_messages