[freeside-commits] freeside/FS/FS cust_pkg.pm,1.72,1.73
Ivan,,,
ivan at wavetail.420.am
Thu Feb 8 14:19:58 PST 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv17084
Modified Files:
cust_pkg.pm
Log Message:
use a LIMIT to retreive the first record, don't rely on qsearchs to trim it for you - it is inefficient and outputs long verbose warnings
Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- cust_pkg.pm 3 Feb 2007 13:05:53 -0000 1.72
+++ cust_pkg.pm 8 Feb 2007 22:19:56 -0000 1.73
@@ -693,7 +693,7 @@
my $cust_pkg_reason = qsearchs( {
'table' => 'cust_pkg_reason',
'hashref' => { 'pkgnum' => $self->pkgnum, },
- 'extra_sql'=> 'ORDER BY date DESC',
+ 'extra_sql'=> 'ORDER BY date DESC LIMIT 1',
} );
qsearchs ( 'reason', { 'reasonnum' => $cust_pkg_reason->reasonnum } )
if $cust_pkg_reason;
More information about the freeside-commits
mailing list