RE: [PHP] Limit 15 where "Newest"

From: Date: Tue, 05 Feb 2002 09:16:12 +0000
Subject: RE: [PHP] Limit 15 where "Newest"
Groups: php.general 
Request: Send a blank email to php-general+get-83559@lists.php.net to get a copy of this message
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:tyler@captainjack.com] Sent: 05 February 2002 04:49 To: WIll; php-general@lists.php.net 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" <willyb@texas.net> To: <php-general@lists.php.net> 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 > >

« previous php.general (#83559) next »