Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Moritz Onken
Am 14.05.2009 um 14:16 schrieb Emmanuel Quevillon: Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc => $g->name(), num => $c->model('Tab

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Emmanuel Quevillon
Emmanuel Quevillon wrote: > Hi, > > Sorry if my question looks stupid, but I'd like to retrieve the > value of a count returned by an SQL query. > > I tried different things but it always return 1 > > Here is the way I'd like it to work: > > ... > acc => $g->name(), > num => $c->model('Table')-

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Chris Cole
Emmanuel Quevillon wrote: > Peter Rabbitson wrote: >> Emmanuel Quevillon wrote: >>> Hi, >>> >>> Sorry if my question looks stupid, but I'd like to retrieve the >>> value of a count returned by an SQL query. >>> >>> I tried different things but it always return 1 >>> >>> Here is the way I'd like it

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Emmanuel Quevillon
Peter Rabbitson wrote: > Emmanuel Quevillon wrote: >> Hi, >> >> Sorry if my question looks stupid, but I'd like to retrieve the >> value of a count returned by an SQL query. >> >> I tried different things but it always return 1 >> >> Here is the way I'd like it to work: >> >> ... >> acc => $g->name

Re: [Dbix-class] Getting a 'count' value

2009-05-14 Thread Denny
On Thu, 2009-05-14 at 14:16 +0200, Emmanuel Quevillon wrote: > I'd like to retrieve the value of a count returned by an SQL query. > > acc => $g->name(), > num => $c->model('Table')->search({'id' => $g->id}, > > where I tried to replace with : > > 1- )->all() > 2- { select =>[{'count' => '*'}],

Re: [Dbix-class] Getting a' count' value

2009-05-14 Thread Peter Rabbitson
Emmanuel Quevillon wrote: > Hi, > > Sorry if my question looks stupid, but I'd like to retrieve the > value of a count returned by an SQL query. > > I tried different things but it always return 1 > > Here is the way I'd like it to work: > > ... > acc => $g->name(), > num => $c->model('Table')-

[Dbix-class] Getting a' count' value

2009-05-14 Thread Emmanuel Quevillon
Hi, Sorry if my question looks stupid, but I'd like to retrieve the value of a count returned by an SQL query. I tried different things but it always return 1 Here is the way I'd like it to work: ... acc => $g->name(), num => $c->model('Table')->search({'id' => $g->id}, where I tried to replac