Quote:
Originally posted by clubdub
i know this is old, but what Logician posted didn't work for me.
This one did.
PHP Code:
if($bbuserinfo[posts] >= 10 AND $bbuserinfo[usergroupid]==2) {
$DB_site->query("UPDATE user SET usergroupid='{theusergroupidhere}' WHERE usergroupid='2'");
|
Well, I dont suggest using this code..
Your code is not only changing the usergroup of the poster, but updating the usergroup for ALL USERS in your database. (ones who are from usergroup 2 and post >=10). This might not be a problem to you but I want to remind you the unnecessary MYSQL server load you are creating for every post your members sent..This can especially be a problem if your post number or user number gets bigger..
The reason my code didnt work for you is probably because you didnt test it when you have exactly 10 posts. As I said in my message it will work ONLY when you are on the exact post number, not less, not much..
If you change $bbuserinfo[posts] == 10 to $bbuserinfo[posts] >= 10 in my code as I mentioned, your problem should be cured..