Hi, I want to sort my search results from a access database in 10 at a page and showed in page 1,2,3.....last. Now Im just using next and previous to goto frm one page to another.

<cfif pageno GT 1>
<td><a href="searchResult1.cfm?page=#pageno-1#" class="style3">< Previous </a></td>
</cfif>
<cfif counter LE #rec_count#>
<td align="right"><a href="searchResult1.cfm?page=#pageno+1#" class="style3">Next > </a></td>
</cfif>

Any suggestions??

Are you having trouble writing the database query, the pagination code, or both?

Are you having trouble writing the database query, the pagination code, or both?

I have the query, but Im just trying to sort the results...Im not sure where to do it-in database or in code in DreamW??

In 99.99% of all cases, you should get the database server to handle the ordering.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.