[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1184] branches/1.2/LedgerSMB/Form.pm
- Subject: SF.net SVN: ledger-smb: [1184] branches/1.2/LedgerSMB/Form.pm
- From: ..hidden..
- Date: Sun, 13 May 2007 23:36:57 -0700
Revision: 1184
http://svn.sourceforge.net/ledger-smb/?rev=1184&view=rev
Author: einhverfr
Date: 2007-05-13 23:36:57 -0700 (Sun, 13 May 2007)
Log Message:
-----------
Another performance patch
Modified Paths:
--------------
branches/1.2/LedgerSMB/Form.pm
Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm 2007-05-14 06:35:17 UTC (rev 1183)
+++ branches/1.2/LedgerSMB/Form.pm 2007-05-14 06:36:57 UTC (rev 1184)
@@ -1490,6 +1490,7 @@
$self->{dbh}->do( $date_query{ $myconfig->{dateformat} } );
$self->{db_dateformat} = $myconfig->{dateformat}; #shim
+ #$self->{dbh}->do('set log_statement to \'all\'');
my $query = "SELECT t.extends,
coalesce (t.table_name, 'custom_' || extends)
@@ -2159,8 +2160,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.