|
-
Feb 17th, 2013, 09:43 AM
#2
Re: Counting User Post Count ?
This would get the user_name with post_count.
Code:
SELECT DISTINCT `user_name`, (SELECT count(*) FROM `tblComments` WHERE `tblComments`.`user_id`=`tblUsers`.`user_id`) AS `post_count` FROM `tblUsers`
Test it out.
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|