QuerySlice(Object query,offset,length)
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. |
<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>