Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convert a database query.

  • Loading branch information...
commit cb55eea0f3609d802da5fdb0ea1c8b3acb0b8ea9 1 parent c65cd70
@bharat bharat authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 modules/digibug/controllers/digibug.php
View
9 modules/digibug/controllers/digibug.php
@@ -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();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.