[Dbix-class] Dbix-class Digest, Vol 15, Issue 3

Robert Dobbs bobisdobbs at hotmail.com
Fri Sep 8 20:15:27 CEST 2006



>From: "Nathan Lewis" <Nathan.Lewis at bbc.co.uk>
>Date: Fri, 8 Sep 2006 15:35:31 +0100
>
>Appologies in advance if this is a stupid and/or frequently asked
>question but what is the correct syntax for Select of 'COUNT( * )' right
>now?
>
>In Version 0.07000
>
>I have tried
>
>$rs->search(undef,
>   	{ select => ['status', { count => 'me.tableid' }],
>      group_by => [qw/date(timestamp) status/] });

It's not just that you select status and tableid, group by date and status, 
and then my @rows = $rs->count->all() ?  i.e. @rows = 
$rs->search(...)->count->all;

If it's not, ergh, people at my former job are going to have a hard time 
figuring out why some obscure counts broke.  :-)

Mark

_________________________________________________________________
Get real-time traffic reports with Windows Live Local Search  
http://local.live.com/default.aspx?v=2&cp=42.336065~-109.392273&style=r&lvl=4&scene=3712634&trfc=1




More information about the Dbix-class mailing list