Ask a Question related to PHP Development, Design and Development.
-
Haseeb #1
Results Page Numbering
hi,
i have a simple solutions for paging a large query result into pages.
format your SQL Query like this and it will work
$nTotal_No_Of_Results_Shown_On_A_Page=20;
if (empty($nCurrentPage))
$nCurrentPage=1;
$tablename="tblusers"; // table from where the data is comming from
$fieldtosorton="user_name"; // a field on wich you want to sort the
result returned
$where="user_enabled=1"; // any where clause
$strQuery="SELECT TOP ".$nTotal_No_Of_Results_Shown_On_A_Page." * FROM
$tablename WHERE $fieldtosorton NOT IN (SELECT TOP "
($nTotal_No_Of_Results_Shown_On_A_Page * ($nCurrentPage -1)) ." "
$fieldtosorton." FROM ".$tablename." WHERE $where ORDER BY ".$fieldtosorton.
) ".$where." ORDER BY ".$fieldtosorton;
this query will give you just the result that you want to show on the
current page. all you have to do is maintain $nCurrentPage. if you change
the query slightly you can get the total no of records and when you get
total no of records then you can also get total no of pages.
HTH,
Haseeb
Haseeb Guest
-
Page Shuffling for with Auto Page Numbering
I'm laying out a 50 page book to print. The book will consist of letter size pages that are folded and stapled down the middle. In order to do so,... -
Page Numbering Extension
I'm looking for a free extension that will give me page numbers at the bottom of my pages that are being pulled from a database. I know how to... -
Adding page numbering
I have used PageMaker 7 to create a number of lessons that I am now importing into Indesign. I have a trial version, runXP Pro - 768 mg RAM. I need... -
Page numbering
I am using acrobat 5.05 with office xp sp2. When using the pdfmaker macro to convert a word doucment to pdf the page numbering changes from page 1 of... -
Page Numbering in InDesign CS
I have a document that needs to start its auto page numbering at page 3 rather than page 1 (cover has to be a seperate file). Theres probably an easy...



Reply With Quote

