[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1183] trunk/LedgerSMB/Form.pm



Revision: 1183
          http://svn.sourceforge.net/ledger-smb/?rev=1183&view=rev
Author:   einhverfr
Date:     2007-05-13 23:35:17 -0700 (Sun, 13 May 2007)

Log Message:
-----------
Another performance patch

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2007-05-14 02:10:32 UTC (rev 1182)
+++ trunk/LedgerSMB/Form.pm	2007-05-14 06:35:17 UTC (rev 1183)
@@ -2152,8 +2152,10 @@
 
     # get years
     my $query = qq|
-		SELECT (SELECT MIN(transdate) FROM acc_trans),
-		       (SELECT MAX(transdate) FROM acc_trans)|;
+                SELECT (SELECT transdate FROM acc_trans ORDER BY transdate asc
+                                LIMIT 1),
+                       (SELECT transdate FROM acc_trans ORDER BY transdate desc
+                                LIMIT 1)|;
 
     my ( $startdate, $enddate ) = $dbh->selectrow_array($query);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.