Jump to content

Archived

This topic is now archived and is closed to further replies.

Gaia

is this possible?

Recommended Posts

[!--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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.