PDA

View Full Version : Need some MySQL help please


Unknown553
Thu 14th Nov '02, 7:07pm
I posted this on vBulletin.org but no one has answered it yet so I'm trying here, maybe it'll get more attention..?

Anyway, I've set up a referral contest on my forum and recently we cought someone cheating and registering multiple accounts, so we set up a new rule; referrals only count after they post 10 posts.

So I have a leaderboard set up which is almost the exact code from the admin CP (user.php?action=referrers more specifically). It shows me how many referrals have been aquired for referrers in a specific time period. But now how do I make it so that it only shows me the referred members with 10+ posts?

The query I have now is

$users = $DB_site->query("SELECT COUNT(*) AS count, user.username, user.userid FROM user AS users
LEFT JOIN user ON (users.referrerid = user.userid)
WHERE users.referrerid <> 0
$datequery
GROUP BY users.referrerid
ORDER BY count DESC");

Any ideas? Thanks in advance.

Unknown553
Wed 20th Nov '02, 1:06am
Anyone? Please?

Cary
Wed 20th Nov '02, 1:14am
This really should be asked over at http://vbulletin.org since it involves hacking the code. Try bumping your post over there.

Unknown553
Wed 20th Nov '02, 5:15pm
I did, it's not getting any attention :(