Reply to Re: Entering current date and time into MySQL database using PHP.

Your name:

Reply:


Posted by J.O. Aho on 08/06/06 18:36

mpar612@gmail.com wrote:

First, PLEASE don't multipost, if you have to ask the same question at more
than one newsgroup then make a crosspost, don't select more than a handful
relevant newsgroups,


> Pretty new to the forums, PHP and MySQL here. I am having an issue
> inserting the current date and time into a MySQL database using PHP.
>
> My table in MySQL is setup with add_date as date not null.
>
> Here is my query:
> $db->query('INSERT INTO lounge (isbn, artist_name, album_title,
> release_date, add_date, description, price)
> VALUES (?,?,?,?,?,?)',
> array($_POST['isbn'], $_POST['artist_name'],
> $_POST['album_title'], $_POST['release_date'], curdate(),
> $_POST['description'], $_POST['price']));

What data type have for your add_date column?
I think you may need to use unix_timestamp() instead.


//Aho

[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

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