Re: [Dbix-class] help needed in forming a 'and' and 'or' select query using DBIx::Class
On Fri, Jan 18, 2013 at 10:19:25AM -0800, Rajeev Prasad wrote: Hello, I am trying to build a query based on two column values as folows: columnA = x (one char, any char - not null) columnB = zz _or_ x,xx,yyy,mm (comma seperated values or just one value) I am looking for rows
Re: [Dbix-class] help needed in forming a 'and' and 'or' select query using DBIx::Class
Hello! columnA = x AND ( columnB = zz OR columnB LIKE '%mm%' ) It should be like this: $val = 'mm'; $my_rs = $schema-resultset('Mytable')-search({ columnA = 'x', -or = [ columnB = 'zz', columnB = { like = '%'.$val.'%' }