Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

using in DBIx::Class

by palette (Scribe)
on Jan 04, 2007 at 11:32 UTC ( #592925=perlquestion: print w/replies, xml ) Need Help??

palette has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to search in net how to use 'in' clause that we use in the sql select query. I need to use a similar thing using DBIx::Class.

I was trying this

my $obj1 = $schema->resultset('table1')->search( { id => { -in =>[1238772, 1071473] } });

Replies are listed 'Best First'.
Re: using in DBIx::Class
by phaylon (Curate) on Jan 04, 2007 at 12:25 UTC
    Don't search "the net," just read DBIC's CPAN documentation. For example, in is an example that uses "IN".

    Update: Also, is your resultset really named "table1"? Where have you got that code from that you're trying? What is the error?

    Ordinary morality is for ordinary people. -- Aleister Crowley
Re: using in DBIx::Class
by tinita (Parson) on Jan 04, 2007 at 12:24 UTC
    do you get an error message? this code works for me...

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://592925]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2023-05-31 11:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found