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
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')-
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
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
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' => '*'}],
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')-
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