Gerg Coates wrote:
> I need to do a search on a resultset that is filtered by two values on
> the same field.
> 
> I tried code like this, but it doesn't seem to be working:
> 
> my $t = $schema->resultset('Table')->search(
>  {
>    'glr_date' => { '>=', $beg_date },
>    'glr_date' => { '<', $end_date }
>  }
> );

Although your question got answered, it wasnt' pointed out _why_ it
doesn't work. This is basic perl, you can not specify the same key
twice in a hash:

rab...@thesaurus:~$ perl -MData::Dumper \
> -e 'my %hash = ( key_1 => "value1", key_2 => "value2", key_1 => "second value 
> 1"); print Dumper \%hash'
$VAR1 = {
          'key_1' => 'second value 1',
          'key_2' => 'value2'
        };
rab...@thesaurus:~$

_______________________________________________
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