PHP Code:
<?php
require "config.php";
$query = mysql_query("SELECT plan, timeleft FROM userinfo");
while ($qrow = mysql_fetch_array($query)) {
$plan = $qrow['plan'];
$timeleft = $qrow['timeleft'];
if ($plan != 0) {
if ($timeleft != 0 || $plan != 123456789) {
mysql_query("UPDATE userinfo SET timeleft = timeleft - 1");
}
}
}
?>
I am trying to do this but instead of minus 1 it is minus 3 on all colums and sometimes -45 and it's doing it to every user even if plan is 0 and time is 0
This is suppose to be an auto cron