diff options
author | C.J. Adams-Collier <cjac@colliertech.org> | 2014-09-08 14:14:20 -0700 |
---|---|---|
committer | C.J. Adams-Collier <cjac@colliertech.org> | 2014-09-08 14:14:20 -0700 |
commit | c9860506278274605e76c1a8c18084db134d7409 (patch) | |
tree | 00b9ec49d51e0618965e0808408e38c766aa0d85 /httemplate/graph | |
parent | b853ec09fb19df91fe0188c5dde9d759333a2503 (diff) |
moved WHERE/AND logic in to calling code. FS RT #884
Diffstat (limited to 'httemplate/graph')
-rw-r--r-- | httemplate/graph/signupdate.cgi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/graph/signupdate.cgi b/httemplate/graph/signupdate.cgi index 011817c3a..8261257f3 100644 --- a/httemplate/graph/signupdate.cgi +++ b/httemplate/graph/signupdate.cgi @@ -43,8 +43,9 @@ my $edate = DateTime->new( month => $cgi->param('end_month') )->add( months => 1 )->epoch(); -my $where .= " AND signupdate >= $sdate ". - " AND signupdate < $edate "; +my $where = (%where ? ' AND ' : ' WHERE '); +$where .= " signupdate >= $sdate ". + " AND signupdate < $edate "; foreach my $cust (qsearch({ table => 'cust_main', hashref => \%where, |