The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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??? |
#2
|
|||
|
|||
![]()
[sql]SELECT COUNT(*) from TABLENAME WHERE userid = <userid>[/sql]
|
#3
|
|||
|
|||
![]()
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
|
#4
|
|||
|
|||
![]()
[sql]select username, count(*) from user group by username[/sql]
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|