Hi I would like to get unique (distinct) values from database using DBix::Class but can't find how to do it with my current search method:
my $rs = $schema->resultset('DiscreteCalendar')->search(
{
holidaytype => 'W',
branchcode => $branchcode,
},
{
select => [{ DAYOFWEEK => 'date' }],
as => [qw/ weekday /],
where => \['date between ? and ?',$today, $endDate ],
}
);
Thank you for your kind help!
You should be able to just add
distinct => 1
in your second hash to thesearch
function, e.g.: