Hello.
i have this code bellow that is supposed to
1: give the user with most points of the day VIP,
2: reset all the points for the users when run
it’s a cron file and when run it only resets the points to 0 and do not do 1 ([I]give the user with most points of the day VIP
[code=php]<?php
require_once(“global.php”);
$sqlReset = “UPDATE fc_users SET today_points=0, today_referred=0, requests_today=0, today_added=0”;
@mysql_query($sqlReset) or die(mysql_error());
$sqlReset = “DELETE FROM fc_users WHERE fid=’0′”;
@mysql_query($sqlReset) or die(mysql_error());
$result = mysql_query(“SELECT * FROM fc_users WHERE featured_status=’1′”)
or die(mysql_error());
while($row = mysql_fetch_array($result)){
$days = $row[‘featured_profile’] – 1;
$lower= mysql_query(“UPDATE fc_users SET featured_profile=’$days’ WHERE fid=”.$row[‘fid’].””);
echo “”. $days .” – “.$row[‘fid’].”<br>”;
if($days < 0) {
$remove = mysql_query(“UPDATE fc_users SET featured_status=’0′ WHERE fid=”.$row[‘fid’].””);
}
}
?>