shouldn't that be $rs->search({ state => $state, last_modified => *\*[ "< TIMEDIFF( NOW(), ? SECONDS", $seconds ], })->delete_all;
Justin On Tue, Jan 26, 2010 at 2:24 PM, Rob Kinyon <rob.kin...@gmail.com> wrote: > On Tue, Jan 26, 2010 at 16:16, Kiffin Gish <kiffin.g...@planet.nl> wrote: > > Very true, but there must be better ways to do this than the reactions > > so far. > > What's wrong with: > > $rs->search({ > state => $state, > last_modified => [ "< TIMEDIFF( NOW(), ? SECONDS", $seconds ], > })->delete_all; > > Standard SQL::Abstract stuff, described in both the DBIC cookbook and > the SQL::Abstract docs. > > Remember - date/time manipulation is NOT standardized. > > 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