phildeman has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I am having trouble trying to create query, using DBIx::Class, where 2 different values may exist in one column.
When I run the following query from SQL Server, all works well;
SELECT * FROM People WHERE Name like '%Franklin%' and Name like '%Linsey%'
However, I tried writing a script with DBIx::Class, with the following:
@results = $schema->resultset( 'Peoplel' )->search({ Name => { like => '%Franklin%' }, Name => { like => '%Linsey'%' } } );
The problem here is the the column name is a hash key, so the second hash key
overwrites the value of the first hash key.
Is there a way to produce the results I want based on the SQL statement above?
Thanks.
-Phil-
Back to
Seekers of Perl Wisdom