From e68a2c760a79d6085f12be9add138067c9935074 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 27 Nov 2007 23:47:07 +0000 Subject: [PATCH] fix small side-effect of mysql-compat change eliminating DISTINCT ON: map changing values of @where array --- httemplate/search/cust_bill.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html index be7406ec6..e3ea8de27 100755 --- a/httemplate/search/cust_bill.html +++ b/httemplate/search/cust_bill.html @@ -148,7 +148,10 @@ if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) { #$orderby = 'ORDER BY cust_bill.custnum ASC, cust_bill._date DESC'; #$count_query = "SELECT 'N/A', 'N/A', 'N/A'"; #XXXXXXX fix - my @newest_where = map { s/\bcust_bill\./newest_cust_bill./g; } + my @newest_where = map { my $x = $_; + $x =~ s/\bcust_bill\./newest_cust_bill./g; + $x; + } grep ! /^cust_main./, @where; my $newest_where = scalar(@newest_where) ? ' AND '. join(' AND ', @newest_where) -- 2.11.0