RE: [PHP-DB] get all records but limit to 6
| From: | Sunmaia | Date: | Mon, 14 Jun 2004 06:44:06 +0000 |
| Subject: | RE: [PHP-DB] get all records but limit to 6 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34771@lists.php.net to get a copy of this message | ||
select * from table order by datetime_field desc limit 0,6
Peter
> -----Original Message-----
> From: Gawie Marais [mailto:gmlists@gam.co.za]
> Sent: 14 June 2004 07:20
> To: php-db@lists.php.net
> Subject: [PHP-DB] get all records but limit to 6
>
>
> hi,
>
> i need to get only the first 6 records sorted by datetime from
> the thousands
> of records in existance. how do i do that ?
>
> thus, only the latest 6 records added to the database should be displayed
> and this can be done with the datetime field in the database. can anyone
> help with the php code please ?
>
>
>
> regards,
>
> gawie.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> Email has been scanned for viruses and SPAM by Trader Mailmanager
> www.trader.uk.com
>
>
>