1 | QuerySlice(Object query,offset,length) |
1 | queryObject.Slice(offset,length) |
Parameter |
Required/Optional |
Description |
Query |
Required |
The query object that you want to slice. |
Offset |
Required |
Specifies the position from where to slice the query object. |
Length |
Optional |
The number of rows from the offset. If you do not specify the length, the function returns all the records until the end of the query object. |
1 2 3 4 5 6 7 | < cfscript > myquery=QueryExecute( "SELECT * FROM APP.ART" ,[],{datasource= "cfartgallery" }) slice1=QuerySlice(myquery,2,3) // Returns rows 2,3, and 4 slice2=QuerySlice(myquery,50) // Returns all rows including and after row 50 writedump(slice1) writedump(slice2) </ cfscript > |