[Dbix-class] Search condition on integer data-type column
Alexander Hartmaier
alexander.hartmaier at t-systems.at
Tue Mar 23 15:36:10 GMT 2010
I'd chain resultsets, that's exactly what the feature it was built for:
my $rs = $c->model('Users')->search({ nem => $nem });
if ( $megye ) {
$rs = $rs->search({ megye => $megye });
}
--
Best regards, Alex
Am Dienstag, den 23.03.2010, 15:31 +0100 schrieb Hetényi Csaba:
> Thank You Rob, it is exactly what i want!
> Works perfectly :)
>
> Now it is clear, that i'm an absolute beginner :)
>
>
> Rob Kinyon írta:
> > 2010/3/23 Hetényi Csaba <csabiwork at tata.hu>:
>
> >
> > my $search_clause = { nem => $nem };
> > if ( $megye ) { $search_clause->{megye} = $megye; }
> >
> > my $rs = $c->model('Users')->search( $search_clause );
> >
> > It's just a hashref.
> >
> > Rob
> >
> > _______________________________________________
> > 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
> >
>
>
> _______________________________________________
> 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
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
More information about the DBIx-Class
mailing list