List:MySQL on Win32« Previous MessageNext Message »
From:Jorge del Conde Date:January 9 2001 3:08am
Subject:Re: 5 last records ?
View as plain text  
Try using SELECT [fields] FROM [table] ORDER BY [date_field] DESC LIMIT 5

Regards
Jorge

MySQL Development Team
    __  ___     ____ __   __
   /  |/  /_ __/ __/ __ \/ /   Jorge del Conde <jorge@stripped>
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\____/ Mexico City, Mexico
        <___/



----- Original Message ----- 
From: "FL" <f.lecorre@stripped>
To: <win32@stripped>
Sent: Monday, January 08, 2001 2:33 PM
Subject: 5 last records ?


> 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