From 7057cc7362e4a380f35aa24e594dba0892e86c10 Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Thu, 12 Apr 2007 16:33:08 +0000 Subject: [PATCH] Fixed error in syntax for deleting. --- .../DQL (Doctrine Query Language) - DELETE queries.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manual/codes/DQL (Doctrine Query Language) - DELETE queries.php b/manual/codes/DQL (Doctrine Query Language) - DELETE queries.php index 79a1e433e..6f2c317a0 100644 --- a/manual/codes/DQL (Doctrine Query Language) - DELETE queries.php +++ b/manual/codes/DQL (Doctrine Query Language) - DELETE queries.php @@ -7,9 +7,10 @@ $rows = $this->conn->query($q, array(3)); $q = new Doctrine_Query(); -$rows = $q->update('Account') - ->where('id > ?') - ->execute(array(3)); +$rows = $q->delete('Account') + ->from('Account a') + ->where('a.id > ?', 3) + ->execute(); print $rows; // the number of affected rows ?>