[freeside-commits] freeside/httemplate/edit rate.cgi, 1.11, 1.11.2.1

Ivan,,, ivan at wavetail.420.am
Mon Oct 29 03:30:59 PDT 2007


Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv24030/httemplate/edit

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	rate.cgi 
Log Message:
mysql has no DISTINCT ON either, sigh

Index: rate.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/rate.cgi,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -d -r1.11 -r1.11.2.1
--- rate.cgi	23 Aug 2006 22:25:37 -0000	1.11
+++ rate.cgi	29 Oct 2007 10:30:57 -0000	1.11.2.1
@@ -58,17 +58,21 @@
   <TH><FONT SIZE=-1>Granularity</FONT></TH>
 </TR>
 % foreach my $rate_region (
-%     sort { lc($a->regionname) cmp lc($b->regionname) }
+%     #sort { lc($a->regionname) cmp lc($b->regionname) }
 %     qsearch({
-%               'select'    => 'DISTINCT ON ( regionnum ) rate_region.*',
 %               'table'     => 'rate_region',
 %               'hashref'   => {},
+%               'order_by'  => 'ORDER BY lc(regionname)',
+%
+%               #'select'    => 'DISTINCT ON ( regionnum ) rate_region.*',
+%               #...
 %               #'addl_from' => 'INNER JOIN rate_prefix USING ( regionnum )',
 %               #'extra_sql' => "WHERE countrycode != '1'",
 %
 %                              # 'ORDER BY regionname'
 %                              # ERROR: SELECT DISTINCT ON expressions must
 %                              #        match initial ORDER BY expressions
+%                              # also, DISTINCT ON is a Pg-ism
 %            })
 %   ) {
 %     my $n = $rate_region->regionnum;



More information about the freeside-commits mailing list