Hi,
I have two queries:
Is there a way that I can combine these?
I was thinking something like:
But I'm not sure what the syntax for this is in MySQL.
Any help? Thanks.
I have two queries:
Code:
SELECT COUNT(*) AS comments FROM ng_comment WHERE ng_comment.collectionid = 47[FONT=Tahoma] [/FONT]
Code:
SELECT COUNT(*) AS comments2 FROM ng_comment WHERE ng_comment.collectionid = 47 AND ng_comment.dateline <= 1262487011
I was thinking something like:
Code:
SELECT COUNT(*) AS comments, COUNT(IF ng_comment.dateline <= 1262487011) AS comments2 FROM ng_comment WHERE ng_comment.collectionid = 47
Any help? Thanks.
Comment