->select(new Database_Expression("DISTINCT `email`"))

instead of:
  ->select("DISTINCT email")

This is not the perfect API.  http://dev.kohanaphp.com/issues/2396 is
the upstream tracking ticket for a better API.
This commit is contained in:
Bharat Mediratta
2009-12-02 10:43:06 -08:00
parent 87bc32345f
commit d0874a65ac

View File

@@ -171,7 +171,7 @@ class notification {
static function send_pending_notifications() {
foreach (db::build()
->select("DISTINCT email")
->select(new Database_Expression("DISTINCT `email`"))
->from("pending_notifications")
->execute() as $row) {
$email = $row->email;