|
Study goal: Makes a paging demonstration The key was uses in SQL sentence limit to define the demonstration the record from several to several. We need a record current page variable $page, but also needs altogether record to count $num Regarding $page, if does not have us to let its =0, if has <0 to let its also =0, if surpassed the total number of pages to let he = total number of pages. $execc= ” select count(*) from tablename “; This may obtain the record total Therefore may such write Such $exec may such write $exec= ” select * from tablename limit “. ($page*10).”, 10 “; Finally we need to do are several connections: |
FeaturesArchives |
Recent EntriesRecent CommentsMost Commented |
RSS feed for comments on this post · TrackBack URI
Leave a reply