[Dbix-class] what is the err in this DBIx select...
Rajeev Prasad
rp.neuli at yahoo.com
Mon Apr 15 19:47:44 GMT 2013
I am meaning to run...
search records where:
if item_type='XX' _then_ item column should contain '%01par%' or '%01pqt%'
and,
if item_type='YY' OR item_type='YZ' _then_ item column should contain '%00mxz%'
and,
for all other item_type no condition (select them)
and i am using following: but i get error in DBIx: "err in sql syntax..."
so what am i doing arong below?
my @itemListRef = $schema->resultset('Itemlist')->search(
{
{
item_type => 'XX',
item => [{ like => '%01par%' },{ like => '%01pqt%' }]
},
{
item_type => [{ like => 'YY' }, { like => 'YZ' } ],
item => { like => '%00mxz%' }
}
},
{ select => [qw/item_id item item_alias/] }
);
More information about the DBIx-Class
mailing list