You are here: Re: Convert datetime to unix timestamp « PHP Programming Language « IT news, forums, messages
Re: Convert datetime to unix timestamp

Posted by Joshua Beall on 10/23/06 20:22

Aggelos wrote:
> > In PHP, you could use strtotime(), but if the data comes from a database I
> > strongly recommend to let the database handle it.
<snip>
> But I don't understand what can be different in PHP from MySQL built in function.

The point is that if you can get the database to give you your data in
the format you want it, that's preferable to having to massage the date
that MySQL gives you into the format you want. So, if the database
allows you to transform your data the way you want, why not take
advantage of it?

Functionally, you end up with the same result, so I understand your
confusion on the reasoning.

-Josh

 

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

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