Skip to content

Commit

Permalink
Convert a database query.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Dec 14, 2009
1 parent c65cd70 commit cb55eea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/digibug/controllers/digibug.php
Expand Up @@ -115,9 +115,10 @@ public function close_window() {
}

private function _clean_expired() {
Database::instance()->query(
"DELETE FROM {digibug_proxies} " .
"WHERE request_date <= (CURDATE() - INTERVAL 10 DAY) " .
"LIMIT 20");
db::build()
->delete("digibug_proxies")
->where("request_date", "<=", new Database_Expression("(CURDATE() - INTERVAL 10 DAY)"))
->limit(20)
->execute();
}
}

0 comments on commit cb55eea

Please sign in to comment.