SQL cleanup

This commit is contained in:
Michael Foster 2013-07-31 20:51:43 -04:00
parent 6bbe407e18
commit 328484bee7
7 changed files with 64 additions and 69 deletions

View file

@ -61,9 +61,8 @@
// debug just the graphing (not updating) with the --debug switch
if (!isset($argv[1]) || $argv[1] != '--debug') {
// Update graph
$query = query(sprintf("SELECT MAX(`id`) AS `count` FROM `posts_%s`", $board));
$count = $query->fetch();
$count = $count['count'];
$query = query(sprintf("SELECT MAX(`id`) FROM `posts_%s`", $board));
$count = $query->fetchColumn();
if (!rrd_update($file, Array(
'-t',