When using two numbers, the first number defines the OFFSET, the
second number is the LIMIT.

In a findAll query, look to the PAGE parameter:

findAll(string $conditions, array $fields, string $order, int $limit,
int $page, int $recursive);

The page will automatically set the offset to $page * $limit. In other
words, if you have a limit of 10 items per page, and you're on page 3,
then the offset would be 30. That'd be the same as "LIMIT 30, 10"
using your syntax.


On Mon, Jun 30, 2008 at 2:56 PM, Margarittka <[EMAIL PROTECTED]> wrote:
>
> Hello!
>
> Does anybody know, how can i realize mysql-request like "SELECT * FROM
> products WHERE Product.active = 1 LIMITS  30, 5; " ? i want to know
> how to do such request with two limits using  function findAll.
> Please, help me if you know how to do it!! Thank for any help

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to