You are here: Re: Put today's date into a MySQL "date" formated field « PHP Programming Language « IT news, forums, messages
Re: Put today's date into a MySQL "date" formated field

Posted by Chris Hope on 08/04/06 01:42

walterbyrd wrote:

>
> IchBin wrote:
>
>> >
>> now() is a SQL function.
>>
>
> Tried this:
>
> $day = now();
>
> got this:
>
> Fatal error: Call to undefined function: now()
>
> I dunno. It doesn't seem to work for me. I'll try the quotes next.

That's because now() is *not* a PHP function, it's a SQL function. I
think this fact has been posted five times now, including in the post
you just replied to.

So you use it like this:

INSERT INTO some_tablename (datefield_name) VALUES (now())

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com

 

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

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