Helpers and simple users,
I want to build a simple list of all my forum users that have more than xx private messages hanging around. That is i want to be able to notify them to delete some old privates.
Could you help me to make a simple php program to do that ? A stand alone one, not agregated to the forum itself.
Thank's in advance,
KK
SELECT COUNT(ID_PM) AS pms, ID_MEMBER
FROM smf_im_recipients
WHERE is_deleted = 0
GROUP BY ID_MEMBER
HAVING pms > ##;
What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0)
-[Unknown]
Sorry but yhe "smf_im_recipients" is not a valid table.
What table should it be ?
KK
What tables do you have with "recipients" in their name?
-[Unknown]
Sorry, probably my mistake
I should read carefuly to understand your code before posting.
The database is smfim_recipients, so just the underscore to remove.
I will test and give feedback.
KK
Ok, so the correct code should be :
SELECT COUNT(ID_PM) AS pms, ID_MEMBER
FROM smfim_recipients
WHERE deleted = 0
GROUP BY ID_MEMBER
HAVING pms > XX
but i was able to solve the problem with the folowing code as well :
SELECT ID_MEMBER, membername, instantMessages
FROM `smfmembers`
WHERE `instantMessages` > XX
ORDER BY `instantMessages` ASC"
Thank's anyway for your help,
KK