Thanks for the help. I have done reading, but what I have tried was giving me errors. I had something similar to your first to examples.
method get_my_mixedskills( $id, $color1, $color2 ) {
my $whrcls;
if(!$color2){
$whrcls = "ID => $id, color => $color1";
}
else {
$whrcls = "-and => [
-or => [
color => $color1,
color => $color2, ],
ID => $id, ], "
}
my @myskills_objs = $schema->resultset( 'TblSkillSelected' )->search({ $whrcls },
{ order_by => 'SID' });
}
In reply to Re^2: Querying data with and & or when using DBIx::Class
by phildeman
in thread Querying data with and & or when using DBIx::Class
by phildeman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |