Thread DBIx::Class: ResultSet über eine relativierte Tabelle sorieren
(6 answers)
Opened by pktm at 2009-01-14 17:59
Da musst Du wohl mit einem Workaround arbeiten:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 my $rs = $schema->resultset('Thread')->search(undef, { join => 'posts', select => [qw/subject timestamp/], '+select' => \'MAX(timestamp) as tmax', '+as' => [qw/tmax/], order_by => 'tmax DESC', group_by => 'me.thread_id', }, ); foreach my $x ( $rs->all() ) { say $x->get_column('tmax') . " " . $x->subject(); } OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/) -- Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html Perl-Entwicklung: http://perl-services.de/ |