List:MySQL on Win32« Previous MessageNext Message »
From:Stephen Woodbridge Date:January 8 2001 8:40pm
Subject:Re: 5 last records ?
View as plain text  
How about:

select * from table order by date desc limit 5

-Steve

FL wrote:
> 
> Hi,
> 
> How to build an efficient query to display the 5 last records (order by
> date) ?
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail win32-thread4728@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail win32-unsubscribe@stripped instead.
Thread
mysql_affected_rows() reportedly returns 0 for queries on BDBtablesCynic8 Jan
  • 5 last records ?FL8 Jan
  • Re: 5 last records ?Stephen Woodbridge8 Jan
  • Re: 5 last records ?Steve Ruby8 Jan
  • Re: 5 last records ?Jorge del Conde9 Jan
  • Re: mysql_affected_rows() reportedly returns 0 for queries onBDB tablesCynic9 Jan