1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/codes/Basic Components - Query - LIMIT and OFFSET - limiting the query results.php

14 lines
274 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
2006-12-04 02:40:32 +03:00
// find the first ten users and associated emails
2006-07-24 01:08:06 +04:00
2006-12-04 02:40:32 +03:00
$q = new Doctrine_Query();
$coll = $q->from('User u LEFT JOIN u.Email e')->limit(10);
2006-07-24 01:08:06 +04:00
// find the first ten users starting from the user number 5
2006-12-04 02:40:32 +03:00
$coll = $q->from('User u')->limit(10)->offset(5);
2006-07-24 01:08:06 +04:00
?>