faqts : Computers : Programming : Languages : PHP : Database Backed Sites

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 1 people (0%) answered Yes
Recently 0 of 1 people (0%) answered Yes

Entry

How do maintain position in the selected rows as each page is refreshed?

Mar 10th, 2006 08:56
Praveen Kumar Kukkapalli, Evan Kaminer,


Using pagination..
You can send pagenumber along with the page URL, then you can limit the
number based on the page number....
Example if you want to show 20 entries per page then first
if($page>1)
{
   $start = ($page-1)*20;
}
else
{
   $start = 0;
}
$sql = "SELECT * FROM $table LIMIT $start, 20";