Michele Beltrame <m...@cattlegrid.info> writes: > 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.'%' } > ], > });
Or a slightly more concise version: my $rs = $schema->resultset('MyTable')->search({ columnA => 'x', columnB => [ 'zz', { like => '%'.$val'%' } ], }); -- "The surreality of the universe tends towards a maximum" -- Skud's Law "Never formulate a law or axiom that you're not prepared to live with the consequences of." -- Skud's Meta-Law _______________________________________________ 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