update with post count
This commit is contained in:
parent
357d066730
commit
91936502dc
@ -43,12 +43,13 @@
|
||||
$query = prepare(sprintf("SELECT COUNT(*) AS `count` FROM `posts_%s` WHERE `time` >= :time", $board));
|
||||
$query->bindValue(':time', time() - $this->interval, PDO::PARAM_INT):
|
||||
$query->exeucte() or error(db_error($query));
|
||||
$query->fetch();
|
||||
$count = $query->fetch();
|
||||
$count = $count['count'];
|
||||
|
||||
if(!rrd_update($file, Array(
|
||||
'-t',
|
||||
'posts',
|
||||
'N:')))
|
||||
'N:' . $count)))
|
||||
error('RRDtool failed: ' . htmlentities(rrd_error()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user