[freeside-commits] branch FREESIDE_3_BRANCH updated. 159fbfeb355b1beaeca562ff5ef4e5e8451eaa7a

Jonathan Prykop jonathan at 420.am
Mon Jul 27 19:17:14 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  159fbfeb355b1beaeca562ff5ef4e5e8451eaa7a (commit)
      from  47e1a8203e1fa6695c93bcb48fe6eaf1214c7fa3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 159fbfeb355b1beaeca562ff5ef4e5e8451eaa7a
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Fri Jul 24 22:35:26 2015 -0500

    RT#29833: MySQL error running Reports -> Packages -> Package Summary

diff --git a/httemplate/search/cust_pkg_summary.cgi b/httemplate/search/cust_pkg_summary.cgi
index c0eb699..76ca895 100644
--- a/httemplate/search/cust_pkg_summary.cgi
+++ b/httemplate/search/cust_pkg_summary.cgi
@@ -56,7 +56,8 @@ foreach my $column (keys %conds) {
   my $count_query = $h_search->{count_query};
 
   # push a select expression for the total packages with pkgpart=main.pkgpart
-  push @select, "($count_query AND h_cust_pkg.pkgpart = main.pkgpart) AS $column";
+  # (have to quote $column, otherwise mysql thinks before/after are keywords)
+  push @select, "($count_query AND h_cust_pkg.pkgpart = main.pkgpart) AS \"$column\"";
 
   # and query the total packages with pkgpart=any of the main.pkgparts
   my $total = FS::Record->scalar_sql($count_query . 

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/cust_pkg_summary.cgi |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list