1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/codes/Working with objects - Component overview - Record - Deleting records.php
2007-02-23 20:57:38 +00:00

17 lines
283 B
PHP

<?php
$table = $conn->getTable("User");
$user = $table->find(2);
// deletes user and all related composite objects
if($user !== false)
$user->delete();
$users = $table->findAll();
// delete all users and their related composite objects
$users->delete();
?>