Part 1. Simple to-do list
Before starting to build your application, you need to be aware of the way you want to save the data. A good designed database model will make development of your application the most efficient.
The to-do list that we will use looks as follows:
TodoList
This is the main table that contains the todo items.
report (registers the bug, enhancement request, etc. |
|
|
todo_id |
integer primary key, autonumbering |
Unique identifier of the to do item |
todo_item |
longtext |
The to-do item in text |
todo_prio |
integer |
Priority |
todo_regdate |
date |
Date of registration |
todo_regdl |
date |
Deadline |
|
|
|
It is easy to enter this data using the embedded PHPMyAdmin, but you can also use the following script (If you are not using MySQL, you might need to change datatypes). You can create this table in the existing sample database, but - better - is to create a new database. We called it 'todo'.
CREATE TABLE `todolist` (
todo_id int(11) NOT NULL AUTO_INCREMENT,
todo_item longtext NOT NULL,
todo_prio int(11) NOT NULL,
todo_regdate date NOT NULL,
todo_dl date NOT NULL,
PRIMARY KEY (todo_id)
)