X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fh_Common.pm;h=52af42bfc27746c681fbaa4fa1059389aca15040;hb=c62991706722410987b249893f1323b4ba0e7a5f;hp=58ead88e4f0e12427009219e4e952ae45a7fee62;hpb=f7afca1829f8496509d10806439c37fcc1349135;p=freeside.git diff --git a/FS/FS/h_Common.pm b/FS/FS/h_Common.pm index 58ead88e4..52af42bfc 100644 --- a/FS/FS/h_Common.pm +++ b/FS/FS/h_Common.pm @@ -64,11 +64,25 @@ sub sql_h_search { '', - 'maintable', + 'AS maintable', ); } +=item sql_h_searchs END_TIMESTAMP [ START_TIMESTAMP ] + +Like sql_h_search, but limited to the single most recent record (before +END_TIMESTAMP) + +=cut + +sub sql_h_searchs { + my $self = shift; + my($select, $where, $cacheobj, $as) = $self->sql_h_search(@_); + $where .= ' LIMIT 1'; + ($select, $where, $cacheobj, $as); +} + =back =head1 BUGS