1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/manual/codes/DQL (Doctrine Query Language) - DELETE queries.php

16 lines
329 B
PHP

<?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();
$rows = $q->update('Account')
->where('id > ?')
->execute(array(3));
print $rows; // the number of affected rows
?>