You are here: Re: datetime in mysql « PHP Language « IT news, forums, messages
Re: datetime in mysql

Posted by Mark D Smith on 06/28/05 14:34

"Colin McKinnon" <colin.deletethis@andthis.mms3.com> wrote in message
news:d9ravh$jaa$1$8300dec7@news.demon.co.uk...
> Mark D Smith wrote:
>
> > Hi
> >
> > i am inserting various values in a mysql table via php. now the ID is
auto
> > increment but how do i get the datetime to update when i post the values
> > to say the new ID (row) that my "INSERT INTO / VALUES sql statement has
> > just preformed?
> >
> > i can format a string for the datetime and send that with the insert but
> > just wondering if there is a shortcut.
> >
>
> erm...
>
> INSERT INTO myTable (dateField) VALUES (now());
>
> Go get a copy of the MySQL manual - there's a whole load of functions for
> working with dates/times in MySQL
>
> C.

works like a dream, note comment on manual will get round to it.

thanks

Mark

 

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

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