Onbekend |
|
ok, ik dacht dat het opgelost was omdat er opeens geen geld meer bij kwam, maar toen er een uur voorbij was, ging er weer altijd geld bij
<?php
$dbres = mysql_query("SELECT UNIX_TIMESTAMP(time) AS `time`, `name` FROM `cron` WHERE `name`='hour'") or DIE(mysql_error());
while($x = mysql_fetch_assoc($dbres))
$update[$x['name']] = $x['time'];
if(floor($update['hour']/3600) != floor(time()/3600)){
mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='hour'");
include "cronhour.php";
}
?>
<?php $update[$x['name']] = $x['time']; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='hour'"); include "cronhour.php"; } ?>
EDIT:
toch opgelost, had tabel foute naam gegeven
juiste code
<?php
$dbres = mysql_query("SELECT UNIX_TIMESTAMP(time) AS `time`, `name` FROM `cron` WHERE `name`='hour'") or DIE(mysql_error());
while($x = mysql_fetch_assoc($dbres))
$update[$x['name']] = $x['time'];
if(floor($update['hour']/3600) != floor(time()/3600)){
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='hour'");
include "cronhour.php";
}
?>
<?php $update[$x['name']] = $x['time']; mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='hour'"); include "cronhour.php"; } ?>
|