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 where: (columnB contains either zz or mm...)
columnA = x AND ( columnB = zz OR columnB LIKE '%mm%' )
I am trying following which is not giving correct results.
$val = 'mm';
 $my_rs = $schema->resultset('Mytable')->search({
              columnA => 'x',
              columnB => { like => 'zz' },
              columnB => { like => '%'.$val.'%' }
pl advice.
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to