|
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]
|