Reply to Re: [PHP] sort by date

Your name:

Reply:


Posted by Marek Kilimajer on 10/21/89 11:15

William Stokes wrote:
> Hello,
>
> I made a mistake and stored date information to DB as varchar values
> (dd.mm.yyy). When I read the DB is it still possible to sort the data by
> date with SQL query (ORDER BY date ASC)? Or is it nessessary to have the
> date information to be stored as a date in the DB? Will it work or is the
> output going to be sorted randomly?

It would be sorted by day first, then month, then year.

Add another column (DATE type) to the table and update it from the
current column using SUBSTRING() function.

[Back to original 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

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