Re: [CDBI] Performing a search on many IDs

Matt S Trout <dbix-class-uY5y5/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Joss Shaw wrote:
> Hello,
> 
> I've got a list of about 500 primary key IDs, which I
> want to do a search on with some other search
> criteria. In basic SQL I would do:
> 
> SELECT * FROM x WHERE <conditions> AND ID IN (<list of
> primary key IDs>)
> 
> I'm wondering how best to achieve this with
> Class::DBI. Is it a matter of using ::Sweet ?

Sweet or AbstractSearch are probably your best bets, unless you want to define 
a set_sql per query

(<obplug>or just switch to DBIx::Class ...</obplug>)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.