From 6a22335d0376846dfbbfda0bb952719b30ce2d30 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 7 Jul 2002 13:25:12 +0000 Subject: [PATCH] don't forget to where the where clause --- httemplate/search/cust_bill.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; -- 2.11.0