Page 1 of 1

Displaying the result in a particular fromat

Posted: Mon Nov 07, 2005 7:44 am
by xs2manish
i have to display results of a query where in the paid listings get displayed first and then the free listings. Also there is a limit or 10 results per page. that means if there are 5 paid listings in the database then the first page will have the first five as paid results and the next 5 a free results and on the subsequent pages the result will be free pages.

Please help me to solve this.

Posted: Mon Nov 07, 2005 7:49 am
by feyd
you will need some flag that says "this record has priority" the use the ORDER BY construct of your database to (first) sort by that field.

As for the rest of your issue, it's a standard pagination thing.. there's been many many threads on pagination here.. including a basic class to handle them by Jcart in the Code Snippets board..