Jump to content

Multiple timestamps


Eiolon

Recommended Posts

Hello,

I am creating a help desk and would like it to stamp the date/time when a request is submitted and also a date/time when the request is completed.  How would I go about having two timestamps?  Here is what I have for my structure:

[code]create table requests (
id int not null primary key auto_increment,
employee varchar(50) not null,
category varchar(50) not null,
priority varchar(10) not null,
description text not null,
status varchar(10) not null default 'Open',
submitted timestamp not null default current_timestamp,
completed timestamp not null default current_timestamp,
technician varchar(50) not null
);[/code]

I get this error:

[quote]ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP
column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause[/quote]

How do I accomplish two timestamps?  Thanks!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.