Re: Limit 15 where "Newest"
| From: | Tyler Longren | Date: | Tue, 05 Feb 2002 04:49:02 +0000 |
| Subject: | Re: Limit 15 where "Newest" | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83520@lists.php.net to get a copy of this message | ||
$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
>
>