1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/manual/codes/DQL (Doctrine Query Language) - LIMIT and OFFSET clauses.php
2006-10-20 19:31:37 +00:00

15 lines
328 B
PHP

<?php
// retrieve the first 20 users and all their associated phonenumbers
$users = $conn->query("SELECT u.*, p.* FROM User u, u.Phonenumber p LIMIT 20");
foreach($users as $user) {
print ' --- '.$user->name.' --- \n';
foreach($user->Phonenumber as $p) {
print $p->phonenumber.'\n';
}
}
?>