Tuesday, 23 October 2012

Page Navigation pseudo code


  1. Define recordperpage
  2. Find total numberofrecords
  3. Calculate totalpage required
  4. Initialize and store currentpagenumber
  5. Calculate starting record
    • Recordperpage * (currentpagenumber -1)
  6. Set numberofrecord = record per page
  7. Select * from table order by CustomerID limit start number of record



Define Record Per Page RecPerPage
 
TotalRec =Select NumberOfQuestions from Test where CourseID=””
 
Calculate total pages required Pages=ceil (TotalRec /RecPerPage)
 
Flowchart: Decision: Isset $_GET[curPageNo]
$curPage= 1
 
$curPage=$_GET[curPage]
 
Calculate Start=RecPerPage*($curPage-1)
 
numOfRec=RecPerPage
 
Query=”select * from table where recordID=questionID order by QuestionID  limit start numOfRec”
 
Query=”select * from table where recordID=questionID order by QuestionID  limit start numOfRec”
 
Back Save
Back Next

 
 

No comments:

Post a Comment