Kory,

Since your fieldtype for "TheDate" is timestamp(14), you don't need a
function to insert a timestamp there.
In fact, what you're doing now is inserting the text "TIMESTAMP" into a date
field, which results in '000000000000'
Instead of 'TIMESTAMP', use NULL -- and don't put quotation marks around
it!!
By inserting 'nothing' into your "TheDate" field, MySQL is allowed to update
the timestamp.


Regards,

Sebastiaan J.A. Kamp

----- Original Message -----
From: "Kory Wheatley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 27, 2001 1:17 AM
Subject: timestamp problem


> I'm using PHP to add records into a mysql database. The records write
> successfully to the database
> except for the timestamp field which I have defined as
> Field          Type                          Null      Key
> Default       Extra
> TheDate    timestamp(14)             YES                 NULL
>
> Everytime I write a record or edit a record it puts 000000000000000  in
> the TheDate, which of course is not the correct date.
> Here is the insert command below that I'm using, does anyone have a
> solution.
>
> $query3 = "INSERT INTO Quser VALUES('', '$fullname', '$add_novell',
> '$tot_novell', '$add_cwis', '$tot_cwis', '$add_mail', '$tot_mail',
> 'TIMESTAMP')";
>      mysql_query($query3);
>
> is the TIMESTAMP option where I get the current date from.
>
> --
> #########################################
> Kory Wheatley
> Academic Computing Analyst Sr.
> Phone 282-3874
> #########################################
> Everything must point to him.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to