epoch1 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to concatenate some columns using DBIx Class but I can't figure out how to do it.
I have a database that has separate date and time columns that I need to concatenate into a single field, Id usually use something like
select col1, col3, CONCAT(date, ' ', time) AS startTime...
Here's my select code:
my $rs = $self->db->resultset('MODELCLASS')->search(undef, { select => [ 'col1', 'col2', 'date' . ' ' . 'time' ], as => [ qw/ id title time /], rows => 10 });
Can anyone tell me how I can do this?
Cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBIx Class Concatenating columns
by Corion (Patriarch) on Mar 06, 2017 at 16:59 UTC | |
|
Re: DBIx Class Concatenating columns
by thanos1983 (Parson) on Mar 06, 2017 at 16:49 UTC | |
by hippo (Archbishop) on Mar 06, 2017 at 17:04 UTC | |
|
Re: DBIx Class Concatenating columns
by Anonymous Monk on Mar 06, 2017 at 18:02 UTC |