2006-10-19 11:48:03 +00:00
|
|
|
<?php
|
|
|
|
$q = 'DELETE FROM Account WHERE id > ?';
|
|
|
|
|
|
|
|
$rows = $this->conn->query($q, array(3));
|
|
|
|
|
|
|
|
// the same query using the query interface
|
|
|
|
|
|
|
|
$q = new Doctrine_Query();
|
|
|
|
|
2007-04-12 16:33:08 +00:00
|
|
|
$rows = $q->delete('Account')
|
2007-04-12 16:34:33 +00:00
|
|
|
->from('Account a')
|
2007-04-12 16:33:08 +00:00
|
|
|
->where('a.id > ?', 3)
|
|
|
|
->execute();
|
2006-10-19 11:48:03 +00:00
|
|
|
|
|
|
|
print $rows; // the number of affected rows
|
|
|
|
?>
|