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;
|