Posted by scott Johnson on 10/31/05 04:10
Well you will probably need to add an extra field and fill it with the
date the message was added.
Then do a query.
"SELECT * FROM news ORDER BY date_added ASC LIMIT 5"
Colin Roosendaal wrote:
> Hello,
>
> Can someone tell me how to do the following:
>
> I'm looking for the PHP/MySQL query to get the last 5 added records from my
> database.
>
> For your info
>
> DB name: news
> table name: messages
>
> I hope you can help me.
>
> Thanks,
>
> Colin Roosendaal
>
>
--
Scott Johnson
http://www.seaforthsailingclub.com
Navigation:
[Reply to this message]
|