You are here: Re: ORDER BY « All PHP « IT news, forums, messages
Re: ORDER BY

Posted by gerg on 10/13/98 11:35

Oli Filth wrote:

> This is why DATE fields were invented (assuming you're using MySQL) - so
> that you don't have to maintain three fields, and so that you don't get
> problems like this.
> http://dev.mysql.com/doc/refman/5.1/en/datetime.html
>
> See also:
> http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html

I guess I'm showing my newbness. I've never really understood the mysql
DATE functions, but I'll definelty look into this.

> It also saves space - a DATE field is 3 bytes, whereas with your scheme
> (assuming `year` and `day` are INTs, and `month` is a VARCHAR with
> average length of 6.25 characters), then on average that's 15.25 bytes.

Also very good to know.

> P.S. "IE" means Internet Explorer to most people in these newsgroups,
> you should use "ie" or "i.e." instead. It took a few minutes to work out
> that you weren't talking about IE at all... ;)

I didn't even think about that. But it makes total sense. Thanks again
for your help and for the links. Hope you and yours have a Merry Christmas!

Thanks again to everyone who takes the time to help out on the boards!

Merry Christmas or Happy Holidays, whichever you prefer!

Greg

 

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

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