[Dbix-class] Column Arithmatic
fREW Schmidt
frioux at gmail.com
Thu May 10 17:11:07 GMT 2012
> select colA * colB as product from tableC
>>
>
> $rs->search({
> # your conditions
> }, {
> select =3D> [ \'col1 * colb' ],
> as =3D> [ 'product' ],
> });
>
And to make it even nicer:
$rs->search({
# your conditions
}, {
columns =3D> { product =3D> \['col1 * colb'] },
});
-- =
fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120510/060=
e6bef/attachment-0001.htm
More information about the DBIx-Class
mailing list