|
Main (PHP)
3rd Party Streams
Resources
Code Snippets
Affiliates
|
|
|
|
| |
->limit()Description
Sets the limit for a query. (this only works on databases that support the LIMIT clause),
without parameters, it will clear the current limit.
NoteThis function can not be called
statically. Since postgres and mysql only really support limit directly - calling this on
an unsupported database will emit a PEAR::Error and die. ExampleExample 26-1. Setting the Limit $person = new DataObjects_Person;
$person->limit(2);
$person->find();
while ($person->fetch()) {
echo "$person->id} {$person->name}<BR>";
}
$person = new DataObjects_Person;
$person->limit(2,4);
$person->find();
while ($person->fetch()) {
echo "$person->id} {$person->name}<BR>";
} |
|
|
|
|
| |
|
|
|
Top Sponsor
Sponsors
Sponsors
Advertisting
Affiliates
|
|