fellow phpbuilders,
I'm a relative novice so please bear with me ...
I have a database full of files. I want the 10 most recent files to have links to my front page and then have the next most recent 30 on a page the user can reach by clicking on "Next Page..." and so on and so on ...
I have the code to extract the most recent files to the front page.
The question is how do I start the following page where I left off.
The code I have at present is below:
$result = mysql_query("SELECT * FROM press_releases ORDER BY ID DESC",$db);
if ($myrow = mysql_fetch_array($result)) {
do {
printf("<a href=http://www.phpbuilder.com/board/archive/index.php/\"press_release?id=%s\">%s</a><p>\n", $myrow["id"], $myrow["header"]);
} while ($myrow = mysql_fetch_array($result));
thanks,
cdherold
I'm a relative novice so please bear with me ...
I have a database full of files. I want the 10 most recent files to have links to my front page and then have the next most recent 30 on a page the user can reach by clicking on "Next Page..." and so on and so on ...
I have the code to extract the most recent files to the front page.
The question is how do I start the following page where I left off.
The code I have at present is below:
$result = mysql_query("SELECT * FROM press_releases ORDER BY ID DESC",$db);
if ($myrow = mysql_fetch_array($result)) {
do {
printf("<a href=http://www.phpbuilder.com/board/archive/index.php/\"press_release?id=%s\">%s</a><p>\n", $myrow["id"], $myrow["header"]);
} while ($myrow = mysql_fetch_array($result));
thanks,
cdherold