update with post count

This commit is contained in:
Savetheinternet 2011-06-07 15:25:05 +10:00
parent 357d066730
commit 91936502dc

View File

@ -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()));
}
}