1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/manual/codes/Basic Components - Record - Deleting records.php

17 lines
286 B
PHP

<?php
$table = $session->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();
?>