diff options
Diffstat (limited to 'httemplate/search/cust_bill.cgi')
-rwxr-xr-x | httemplate/search/cust_bill.cgi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/httemplate/search/cust_bill.cgi b/httemplate/search/cust_bill.cgi index 6eba4bd49..f4ead7042 100755 --- a/httemplate/search/cust_bill.cgi +++ b/httemplate/search/cust_bill.cgi @@ -68,7 +68,7 @@ if ( $cgi->keywords ) { die "unknown query string $query"; } - my $extra_sql = scalar(@where) ? join(' AND ', @where) : ''; + my $extra_sql = scalar(@where) ? 'WHERE '. join(' AND ', @where) : ''; my $statement = "SELECT COUNT(*) FROM cust_bill $extra_sql"; my $sth = dbh->prepare($statement) or die dbh->errstr. " doing $statement"; |