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. Link to comment https://forums.phpfreaks.com/topic/2629-is-this-possible/ 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 Link to comment https://forums.phpfreaks.com/topic/2629-is-this-possible/#findComment-8720 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.