I'm not a DBIC expert, but I don't think so. The [...] construct creates an arrayref, so the leading '\' would just create a reference to a reference which is probably NOT what you want. :-) Perhaps you're thinking about passing a scalar ref to put raw SQL into the query, ie. \"some sql"?<br>
<br>Drew<br><br><div class="gmail_quote">On Tue, Jan 26, 2010 at 10:09 PM, Justin Hunter <span dir="ltr"><<a href="mailto:justin.d.hunter@gmail.com">justin.d.hunter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
shouldn't that be<div class="im"><br><br>$rs->search({<br>
state => $state,<br>
last_modified =><span style="background-color: rgb(255, 255, 51);"> </span><b style="background-color: rgb(255, 255, 51);">\</b>[ "< TIMEDIFF( NOW(), ? SECONDS", $seconds ],<br>
})->delete_all;<br><br></div><font color="#888888">Justin</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Jan 26, 2010 at 2:24 PM, Rob Kinyon <span dir="ltr"><<a href="mailto:rob.kinyon@gmail.com" target="_blank">rob.kinyon@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Jan 26, 2010 at 16:16, Kiffin Gish <<a href="mailto:kiffin.gish@planet.nl" target="_blank">kiffin.gish@planet.nl</a>> wrote:<br>
> Very true, but there must be better ways to do this than the reactions<br>
> so far.<br>
<br>
What's wrong with:<br>
<br>
$rs->search({<br>
state => $state,<br>
last_modified => [ "< TIMEDIFF( NOW(), ? SECONDS", $seconds ],<br>
})->delete_all;<br>
<br>
Standard SQL::Abstract stuff, described in both the DBIC cookbook and<br>
the SQL::Abstract docs.<br>
<br>
Remember - date/time manipulation is NOT standardized.<br>
<br>
Rob<br>
<br>
_______________________________________________<br>
List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>
IRC: <a href="http://irc.perl.org#dbix-class" target="_blank">irc.perl.org#dbix-class</a><br>
SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" target="_blank">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" target="_blank">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a><br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>
IRC: <a href="http://irc.perl.org#dbix-class" target="_blank">irc.perl.org#dbix-class</a><br>
SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" target="_blank">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" target="_blank">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a><br></blockquote></div><br>