Hi all, I'm using the following two queries:
1. SELECT SUM(IF(boardid='2',1,0)) AS b2, SUM(IF(boardid='1',1,0)) AS b1, COUNT(*) AS total FROM thread 2. SELECT SUM(IF(boardid='2',1,0)) AS b2, SUM(IF(boardid='1',1,0)) AS b1, COUNT(*) AS total FROM message This literally brings back a total number of threads and messages posted to the two respective boards (boardid1 and 2). All I am wondering is if this can be combined into a single query or does the very nature of using the SUM(IF) not allow this to happen? Regards, Richard -- Fatal Design http://www.fatal-design.com Atari / DarkBASIC / Coding / Since 1995 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php