in reply to Querying 2 Values Form 1 Column in DBIx::Class

See http://search.cpan.org/~ilmari/SQL-Abstract-1.84/lib/SQL/Abstract.pm#Logic_and_nesting_operators

my @results = $schema->resultset( 'People1' )->search({ Name => [ -and => {-like => '%Franklin%'}, {-like => '%Linsey%'}] } );
poj

Replies are listed 'Best First'.
Re^2: Querying 2 Values Form 1 Column in DBIx::Class
by phildeman (Scribe) on Jan 26, 2018 at 21:23 UTC

    Thanks poj,

    That is exactly what I was looking for!

    I finally got it working using the code below, but your way is cleaner and less code!</p

    my $results = $schema->resultset( 'People' )->search({ Name => { like => '%Franklin%' } }, if($results) { $results = $results->search( { Name => {like => '%Linsey%' } } ); } my @result_objs = $results->all;

    Thanks again!

    -Phil-