mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Active Record Query Interface Guide: Corrected the explanation for the OFFSET example.
This commit is contained in:
@@ -465,7 +465,7 @@ Or chaining both +limit+ and +offset+:
|
||||
Client.limit(5).offset(5)
|
||||
</ruby>
|
||||
|
||||
This code will return a maximum of 5 clients and because it specifies an offset this time, it will return these records starting from the 5th client in the clients table. The SQL looks like:
|
||||
This code will return a maximum of 5 clients beginning with the 6th client in the clients table, skipping the first five clients as specified by the offset. The SQL looks like:
|
||||
|
||||
<sql>
|
||||
SELECT * FROM clients LIMIT 5, 5
|
||||
|
||||
Reference in New Issue
Block a user