Permalink
Browse files

fixed if statement for empty where clause ( fixes #24)

  • Loading branch information...
1 parent d37bfd5 commit 6b1ab8e0fa4632af566eada7cee49ca8e61470b3 Gavin Towey committed May 14, 2012
Showing with 2 additions and 3 deletions.
  1. +1 −2 lib/Anemometer.php
  2. +1 −1 lib/MySQLTableReport.php
View
@@ -90,8 +90,7 @@ public function api()
'json' => "report_json",
'json2' => "report_json2",
'print_r' => "report_printr",
- 'table' => "report_result",
- 'graph' => "flot_test"
+ 'table' => "report_result"
);
$output = get_var('output');
View
@@ -856,7 +856,7 @@ function ($k) {
// WHERE
$this->filter_where();
- if (count($this->where) >= 0) {
+ if (count($this->where) > 0) {
$sql .= " WHERE " . join("\n AND ", array_map(
function ($x) {
return $x[0] . ' ' . $x[2] . ' "' . $x[1] . '"';

0 comments on commit 6b1ab8e

Please sign in to comment.