[Dbix-class] Re: complex db function

rahed raherh at gmail.com
Tue Mar 20 10:26:17 GMT 2007


"Oleg Pronin" <syber.rus at gmail.com> writes:

> First method is to pass a scalar ref as one column (it will fall directly in
> SQL).
>
> $rs->search(undef,{
> select=>['id', \'round((julianday(date2) - julianday(date1))*86400)'}],
> as => [('id',lastdate')],
> });
>

Thank you, I'll follow this way, it's quite easy.

-- 
Radek




More information about the Dbix-class mailing list