Re: MySQL Limit Question

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

 



Tony Devlin wrote:

How can I setup a query to select from a database ONLY the last 5 inserted
rows. OR atleast the last 5 starting from this date back, but only select
the last 5 in order.
If anyone has any suggestions I'd appreciate them.
Thanks,
Tony



I would set up a timestamp column in the table then select ordered by the timstamp descending and limit to 5.


--
paperCrane <Justin Patrin>

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux