If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL table design question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-24-05, 00:51
linuxmanxxx linuxmanxxx is offline
Registered User
 
Join Date: Oct 2005
Posts: 1
MySQL table design question

I'm designing a workflow dbase tool and need to add a status column to the table. Question is how would I populate it with about 10 different static status types as well as timestamp and keep a history of the timestamp? I'm building a workflow tool to track steps in project mgmt process. I'm tracking off of order numbers and users and will track from start till completion of the job and keep a history of time in each status and total time overall. I'll figure out the frontend after I get the backend right.
Thanks for any help as it's greatly appreciated, just jumping into the database world finally after avoiding it for the last 7 years in MIS.
Linuxmanxxx
Reply With Quote
  #2 (permalink)  
Old 10-24-05, 11:55
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
create a separate table with three columns
1) an id column that relates back to your main table
2) a status column that you enter one of the 10 or so statuses
3) a timestamp column

now every time you make a change to your main table add a row with these three values to your status table. you can refer back to any state and any date/time in relation to an id from your main table.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On