MySQL Forums
Forum List  »  PHP

select statement with count
Posted by: Steve Wilson
Date: November 09, 2019 07:50AM

Hi There,

Can someone help please.

I have 2 tables Users & userdocs.
I need to select all users and have a count of the users documents.
The joining fields are users.id & userdocs.userid.
How can I use a select statement showing a name & count? something like:
Gary Smith 6
Nathan Davis 4
Ellie Sargeant 7

Thanks for your help.

Best Regards,

Steve.

Options: ReplyQuote


Subject
Written By
Posted
select statement with count
November 09, 2019 07:50AM
November 09, 2019 10:49AM
November 09, 2019 11:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.