List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 5 2002 12:45am
Subject:Re: OK - Simple Timestamps problem getting the better of me!
View as plain text  
At 23:41 +0000 1/4/02, David Ayliffe wrote:
>I have created a test table with:
>
>CREATE TABLE TimeTest (
>Time1 TIMESTAMP(4),
>Time2 TIMESTAMP(8),
>Time3 TIMESTAMP(10),
>Time4 TIMESTAMP(12),
>Time5 TIMESTAMP(14));
>
>This works fine!  No problemo
>
>Now ALL I am trying to do is insert the current time and date into each
>field in the table!!  That's all. 
>
>I'm not new to MySQL or its operation but this has really got the better
>of me.  Maybe its because its 11:40PM after a day of work but can
>someone please tell me how I can insert a row of current time and date
>into a table with different column definitions!
>
>I have tried:
>INSERT INTO TimeTest (NULL, NULL, NULL, NULL, NULL);
>
>I have tried NOW, 'NULL'.

NOW() would work better than NOW.

NULL will insert the current date and time only into the *first*
TIMESTAMP column.

http://www.mysql.com/doc/D/A/DATETIME.html


>
>Please
>
>
>Thanks
>DA

Thread
OK - Simple Timestamps problem getting the better of me!David Ayliffe5 Jan
  • Re: OK - Simple Timestamps problem getting the better of me!Bogdan Stancescu5 Jan
    • RE: OK - Simple Timestamps problem getting the better of me!David Ayliffe5 Jan
      • Re: OK - Simple Timestamps problem getting the better of me!Bogdan Stancescu5 Jan
  • Re: OK - Simple Timestamps problem getting the better of me!Paul DuBois5 Jan
    • Re: OK - Simple Timestamps problem getting the better of me!Paul DuBois5 Jan
  • Re: OK - Simple Timestamps problem getting the better of me!DL Neil5 Jan