Hello!

select colA * colB as product from tableC

$rs->search({
    # your conditions
}, {
    select => [ \'col1 * colb' ],
    as     => [ 'product' ],
});

Please be aware that you won't get an accessor on your row objects for "product", so you'll have to say:

$row->get_column('product');

to get the value.

Cheers,
Michele.

--
Michele Beltrame
http://www.italpro.net/ - [email protected]
Skype: arthas77 - Twitter: _arthas

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to