1
0
mirror of synced 2024-12-15 07:36:03 +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
?>