On Tue, Jan 26, 2010 at 16:16, Kiffin Gish <[email protected]> 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/[email protected]

Reply via email to