Reply to RE: [PHP] mysql/php date functions..

Your name:

Reply:


Posted by Jim Moseby on 09/26/05 22:20

> -----Original Message-----
> From: bruce [mailto:bedouglas@earthlink.net]
> Sent: Monday, September 26, 2005 2:46 PM
> To: 'John Nichel'; php-general@lists.php.net
> Subject: RE: [PHP] mysql/php date functions..
>
>
> john...
>
> that appears to be it!! although i would have assumes it
> would have done a
> most significant bit fill with 0's...
>
> so my question also comes down to .. do i use the php date
> functions for
> date/time manipulation.. or do i use the mysql functions....
>
> any thoughts/suggestions...
>
> -bruce
>

That depends largely on the situation. For instance, if you want to
increment a date in a MySQL table, you would likely do it with a MySQL
statement, because to do it in PHP, you need to do a read, then add the day,
then a write, (two DB calls). With MySQL, you would just do something like:

update `mytable` set 'columnname` date_add(columnname, interval 1 day);

One call to the DB instead of two, much more efficient.

There are many instances where you would want to use PHP to manipulate dates
too, depending on their circumstances.

JM

[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

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