<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Genius! &nbsp;Thanks. &nbsp; Sorry for the trivial question.</div><div><br></div><div>Ben</div><br><div><div>On Oct 14, 2009, at 2:01 PM, John Romkey wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Wed, Oct 14, 2009 at 4:53 PM, Benjamin Hitz <span dir="ltr">&lt;<a href="mailto:hitz@genome.stanford.edu">hitz@genome.stanford.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <br><div><div></div><div class="h5"><br> On Oct 14, 2009, at 1:46 PM, Rob Kinyon wrote:<br> <br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Wed, Oct 14, 2009 at 16:39, Benjamin Hitz &lt;<a href="mailto:hitz@genome.stanford.edu" target="_blank">hitz@genome.stanford.edu</a>&gt; wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> I am having trouble chaining result sets; that is running -&gt;search<br> subsequently.<br> So then I tried this:<br> </blockquote> <br> [snip] Neither will work because you aren't passing hashrefs.<br><br></blockquote></div></div></blockquote><br></div>| Oooh... nice catch but the second one succeeds; that is the correct SQL.<br>|<br>| And this still fails to add the where clause<br> |<br>| perl -I./ -MDB::Mod -e '$r=DB::Mod-&gt;schema-&gt;resultset("Feature"); $r-&gt;search({gene_name=&gt;"ACT1"});$r-&gt;all' ;<br>|<br>|<br>| Ben&nbsp;<div><br></div><div>That's because you're not chaining. $r-&gt;search({gene_name =&gt; "ACT1" }) does not change $r - it returns a new resultset. What you want is</div> <div><br></div><div>my $r2 = $r-&gt;search({gene_name =&gt; "ACT1" });</div><div>$r2-&gt;all;</div><div><br></div><div>- john romkey</div><div><a href="http://www.romkey.com/">http://www.romkey.com/</a></div><div> <br></div> _______________________________________________<br>List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>IRC: irc.perl.org#dbix-class<br>SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a><br>Searchable Archive: <a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Ben Hitz&nbsp;</div><div>Senior Scientific Programmer ** Saccharomyces Genome Database ** GO Consortium</div><div>Stanford University ** <a href="mailto:hitz@genome.stanford.edu">hitz@genome.stanford.edu</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span></div></span> </div><br></body></html>