The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
my problem now is that it only lists MY name!
the query: Code:
SELECT COUNT(id) AS total, user.userid, user.username FROM user LEFT JOIN userphotos USING (userid) GROUP BY userphotos.userid ORDER BY user.usergroupid DESC, user.username LIMIT $offset, 15 and also, i did COUNT(id) because id exists in the userphotos table and not in the user table. |
#12
|
||||
|
||||
]sry... can't help you...
|
#13
|
||||
|
||||
try
GROUP BY user.userid instead of GROUP BY userphotos.userid using COUNT(*) is faster than using COUNT(id) |
#14
|
|||
|
|||
k thanks again
|
#15
|
|||
|
|||
okay, better...but now it outputs "1" instead of "0" (nobody has posted any pics yet, but they all have 1's next their names)
|
#16
|
||||
|
||||
Try this
Code:
SELECT user.userid, user.username, count(userphotos.userid) AS total FROM user LEFT JOIN userphoto ON (userphoto.userid=user.userid) GROUP BY user.userid ORDER BY user.usergroupid DESC, user.username LIMIT $offset, 15 Code:
SELECT user.userid, user.username, count(attachment.userid) as attachmentcount FROM user LEFT JOIN attachment ON (user.userid=attachment.userid) GROUP BY user.userid |
#17
|
|||
|
|||
yes it appears to work just fine. thanks so much.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|