Basic Components - Query - LIMIT and OFFSET - limiting the query results.php 239 Bytes
Newer Older
doctrine's avatar
doctrine committed
1 2 3 4
<?php

// find the first ten users and their emails

5
$coll = $conn->query("FROM User, User.Email LIMIT 10");
doctrine's avatar
doctrine committed
6 7 8

// find the first ten users starting from the user number 5

9
$coll = $conn->query("FROM User LIMIT 10 OFFSET 5");
doctrine's avatar
doctrine committed
10 11

?>