RE: get all records but limit to 6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



select * from table order by datetime_field desc limit 0,6

Peter

> -----Original Message-----
> From: Gawie Marais [mailto:gmlists@xxxxxxxxx]
> Sent: 14 June 2004 07:20
> To: php-db@xxxxxxxxxxxxx
> Subject:  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
> 
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux