Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfset startRow = ((page-1) * pageSize) + 1 />
- <cfset endRow = startRow + pageSize - 1 />
- <cfset tmpQuery = queryNew(get_query.columnList) />
- <cfloop query="get_query" startRow="#startRow#" endRow="#endRow#">
- <cfset tmp = queryAddRow(tmpQuery) />
- <cfloop list="#get_query.columnList#" index="column">
- <cfset tmp = querySetCell(tmpQuery,column,evaluate("get_query.#column#")) />
- </cfloop>
- </cfloop>
- <cfset gridQuery = structNew() />
- <cfset gridQuery.query = tmpQuery />
- <cfset gridQuery.totalrowcount = get_query.recordcount />
- <cfreturn gridQuery />
Add Comment
Please, Sign In to add comment