On Wed, Jul 23, 2008 at 09:24:17AM +0200, Moritz Onken wrote:
>
>
>
> $rs->search({
> -and =>
> [
> {\"extract(year from age(NOW(),birthday))" => 22},
> {sex => "male"}
> ]
> });
> >
> >Have you tried the other way around?
> >
> >-and => [
> > { '' => \'ex
Moritz Onken wrote:
$rs->search({
-and =>
[
{\"extract(year from age(NOW(),birthday))" => 22},
{sex => "male"}
]
});
Have you tried the other way around?
-and => [
{ '' => \'extract(year from age(NOW(),birthday))'},
{sex => "male"}
]
I couldn't understand what is the 22 doing there.
$rs->search({
-and =>
[
{\"extract(year from age(NOW(),birthday))" => 22},
{sex => "male"}
]
});
Have you tried the other way around?
-and => [
{ '' => \'extract(year from age(NOW(),birthday))'},
{sex => "male"}
]
I couldn't understand what is the 22 doing there.
This query fetche
On Tue, Jul 22, 2008 at 09:14:15AM +0200, Moritz Onken wrote:
>
> Am 21.07.2008 um 15:01 schrieb Eden Cardim:
>
> >On Mon, Jul 21, 2008 at 4:59 AM, Moritz Onken
> ><[EMAIL PROTECTED]> wrote:
> >>But how can I rewrite my query to the other format without writing
> >>the raw
> >>sql where claus
On Tue, Jul 22, 2008 at 9:14 AM, Moritz Onken <[EMAIL PROTECTED]> wrote:
>
> Am 21.07.2008 um 15:01 schrieb Eden Cardim:
>
>> On Mon, Jul 21, 2008 at 4:59 AM, Moritz Onken <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> But how can I rewrite my query to the other format without writing the
>>> raw
>>> sql wh
Am 21.07.2008 um 15:01 schrieb Eden Cardim:
On Mon, Jul 21, 2008 at 4:59 AM, Moritz Onken
<[EMAIL PROTECTED]> wrote:
But how can I rewrite my query to the other format without writing
the raw
sql where clause?
Why is it not possible to write my query with as scalar ref:
$rs->search({
-and
On Mon, Jul 21, 2008 at 4:59 AM, Moritz Onken <[EMAIL PROTECTED]> wrote:
> But how can I rewrite my query to the other format without writing the raw
> sql where clause?
> Why is it not possible to write my query with as scalar ref:
>
> $rs->search({
> -and =>
>[
> {\"extract(year from age
Hi,
referring to
>
http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Manual/Cookbook.pod#Using_SQL_functions_on_the_left_hand_side_of_a_comparison
I tried to run this query:
$rs->search({
-and =>
[
{"extract(year from age(NOW(),birthday))" => 22},
{sex => "male"}