![]() |
mysql help please
hi i need some help using a mysql select statement what i have is a table similar to below
userid || username || imagename now each time a user uploads an image there is a new row created what i want to be able to do is get the amount of images uploaded by each user. i thought maybe using count(*) but i could get this to work how i wanted do any1 have any ideas please??? |
[sql]SELECT COUNT(*) from TABLENAME WHERE userid = <userid>[/sql]
|
yes that will tell me how many images that user has but what about all users is there an easy way with out doing 100's of queries
|
[sql]select username, count(*) from user group by username[/sql]
|
All times are GMT. The time now is 08:24 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|