MySQL Forums
Forum List  »  Newbie

DateTime
Posted by: Keith Treuely
Date: April 27, 2005 12:17AM

I have a column called Date in which I want the datetime entry to be automatic. I have read that MySQL updates this column automatically using the serviers date and time. Mine isn't working

Type : DateTime

Default : 0000-00-00 00:00:00

NOT NULL

When I add an entry it doesn't update it just puts 0000-00-00 00:00:00 it doesn't automatically update and it is the first column of it's type in the table.

So I tried a form and php

<td><input type="hidden" name="date" maxlength="30"></td>

input via $_POST[date] still didn't update

so I replaced $_POST[date] with NOW() still didn't update

So i tried it all with TIMESTAMP - still no updating... Ouch!!!

This is very frustrating.... and I really appreciate your help

All I need is that when an entry goes into the table the date column updates and it just isn't happening.

Options: ReplyQuote


Subject
Written By
Posted
DateTime
April 27, 2005 12:17AM
April 27, 2005 12:22AM
April 28, 2005 08:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.