You are here: Re: PHP and MySQL « All PHP « IT news, forums, messages
Re: PHP and MySQL

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация