Gaia Posted October 7, 2005 Share Posted October 7, 2005 [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] COUNT(*) FROM ibf_members, ibf_posts [!--sql2--][/div][!--sql3--] ?? And if it is, how do i get each COUNT(*) result seperatly? So that i can have: members: xx posts: xx Right now it has just counted both those tables and added them together. Quote Link to comment Share on other sites More sharing options...
Katherine Posted October 8, 2005 Share Posted October 8, 2005 One way is to use a subquery... Select count(*) as ibf_members_count, (select count(*) from ibf_posts ) as ibf_posts_count From ibf_members Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.