Knightnet Site Design - View To Do List Entry

You are in section: Home > Site Design > To Do
Entry Details for Entry ID 51 (Parent ID: 15):
mySQL Table Design
Start:2003-01-05 00:00:00 End:
Due: Priority:
Project:
Category: Design

This is the design for the threaded (or hierarchical) information list.

This data type can be used for To Do lists, general news, Actions, Project and other information lists, or just about anything else.

 

<TBODY><TBODY> <TBODY>
 Field  Type Attributes Null Default Extra Index Comments
 id int(10) UNSIGNED No    auto_increment  Primary Key Unique identifier of entry
   int(10) UNSIGNED Yes  NULL    ID of parent (if not a level one entry)
   datetime   Yes  NULL    Start date/time
   datetime   Yes  NULL    End date/time
   datetime   Yes  NULL    Due date/time
   datetime   Yes  NULL    Latest update d/t, set by pages/functions that update the table
   tinyint(3) UNSIGNED Yes  NULL    1-255 or NULL
   varchar(255)   Yes  NULL    Should really be set as it is used for us poor humans!
   varchar(255)   Yes  NULL    Like category, can be used for any kind of categorisation but generally to list the project name
   varchar(255)   Yes  NULL    Can be anything
   varchar(255)   Yes  NULL    User ID of person who created the entry
   varchar(255)   Yes  NULL    User ID of person who last updated entry
   varchar(255)   Yes  NULL    User ID of person assigned to this To Do/Action/etc
   mediumtext   Yes  NULL    Optional detailed text. May contain web safe HTML. Generally limited to no more than 1MB!

 

General Comments:

  • Most fields can be NULL (and therefore are optional) - watch out for testing for NULL in php [if ($xxx===NULL) ...]

 

To create a table:

CREATE TABLE `sitetodo` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `parentId` int(10) unsigned default NULL,
  `start` datetime default NULL,
  `end` datetime default NULL,
  `due` datetime default NULL,
  `updated` datetime default NULL,
  `priority` tinyint(3) unsigned default NULL,
  `title` varchar(255) default NULL,
  `project` varchar(255) default NULL,
  `category` varchar(255) default NULL,
  `createdBy` varchar(255) default NULL,
  `UpdatedBy` varchar(255) default NULL,
  `AssignedTo` varchar(255) default NULL,
  `content` mediumtext,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;

Last Updated: 2003-05-21 22:26:42
Child Entries:
Code to replicate data (both ways) 05/Aug/03 View
Add extra fields for task management Details 22/Jan/04 View

 

Valid HTML 4.01 iconValid CSS icon
© Copyright Julian Knight, July 2008 All rights reserved.
Page: Updated 2008-07-10 08:50:06, Author Julian Knight