If (!$start) $start=0; $sql="select author, title, chapter from table order by date DESC limit $start, 15"; ...
and a link on the same page: echo("<a href='samepage?start=" . ($start + 15) . "'>next</a>"); or something like that Tim www.chessish.com <http://www.chessish.com> ---------- From: Tyler Longren [SMTP:[EMAIL PROTECTED]] Sent: 05 February 2002 04:49 To: WIll; [EMAIL PROTECTED] Subject: Re: [PHP] Limit 15 where "Newest" $sql="select author, title, chapter from table order by date DESC limit 15"; That's how you'd go about getting the 15 most recent table entries. The "next 15" thing will require a bit more though. Tyler ----- Original Message ----- From: "WIll" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 04, 2002 9:37 PM Subject: [PHP] Limit 15 where "Newest" > I am trying to write a limit statement for my database. I want to say > something like > > $sql="select author, title, chapter from database where last_update = > "Newest" order by date limit 15"; > > My question is how do you say " Newest" in php MySQL? > And how do you put t link on the bottom of the page that will select the > next 15 items in the database? > > Thank you. > > --WIll > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php