Home arrow PHP arrow Page 2 - Project Management: The Application

The SQL - PHP

The main project management application that we will examine deals with maintaining user state (tracking users) and all major events that make the application useful, such as adding, removing, and editing projects. It will also enable users to assign tasks and add or remove project staff, as well as maintain files for a particular project.

TABLE OF CONTENTS:
  1. Project Management: The Application
  2. The SQL
  3. The main.php script
  4. Code Explained
By: David Web
Rating: starstarstarstarstar / 5
June 02, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Below is the SQL for each of the tables with sample data included. Just copy and paste it into your MySQL admin client application:

--

-- Table structure for table `files`

--


CREATE TABLE `files` (

`fid` int(4) NOT NULL auto_increment,

`filename` varchar(100) NOT NULL default '',

`p_id` int(4) NOT NULL default '0',

PRIMARY KEY (`fid`)

) TYPE=MyISAM AUTO_INCREMENT=7 ;


--

-- Dumping data for table `files`

--


INSERT INTO `files` VALUES (1, 'projectX.png', 1);

INSERT INTO `files` VALUES (2, 'projectY.png', 2);

INSERT INTO `files` VALUES (3, 'anotherfile.png', 1);

INSERT INTO `files` VALUES (4, 'file.png', 2);

INSERT INTO `files` VALUES (5, 'maintop-satin.jpg', 3);

INSERT INTO `files` VALUES (6, 'Blue hills.jpg', 3);


-- --------------------------------------------------------


--

-- Table structure for table `projects`

--


CREATE TABLE `projects` (

`pid` int(4) NOT NULL auto_increment,

`title` varchar(100) NOT NULL default '',

`project_description` text NOT NULL,

`status` enum('overdue','completed','pending') NOT NULL default 'overdue',

`due_dt` date NOT NULL default '0000-00-00',

`create_dt` date NOT NULL default '0000-00-00',

`u_id` int(4) NOT NULL default '0',

PRIMARY KEY (`pid`)

) TYPE=MyISAM AUTO_INCREMENT=4 ;


--

-- Dumping data for table `projects`

--


INSERT INTO `projects` VALUES (1, 'Project X', 'Secret project6', 'overdue', '2007-03-22', '2007-02-16', 1);

INSERT INTO `projects` VALUES (2, 'Project Y', 'Secret project Y', 'completed', '2007-02-18', '2007-02-18', 2);

INSERT INTO `projects` VALUES (3, 'New1', 'gufgjkk', 'pending', '2007-05-25', '2007-02-19', 1);


-- --------------------------------------------------------


--

-- Table structure for table `staff`

--


CREATE TABLE `staff` (

`sid` int(4) NOT NULL auto_increment,

`p_id` int(4) NOT NULL default '0',

`name` varchar(100) NOT NULL default '',

PRIMARY KEY (`sid`)

) TYPE=MyISAM AUTO_INCREMENT=6 ;


--

-- Dumping data for table `staff`

--


INSERT INTO `staff` VALUES (1, 1, 'Jack Dee');

INSERT INTO `staff` VALUES (2, 2, 'maria.garises');

INSERT INTO `staff` VALUES (3, 1, 'nico.brand');

INSERT INTO `staff` VALUES (4, 2, 'john.doe');

INSERT INTO `staff` VALUES (5, 3, 'john dean');


-- --------------------------------------------------------


--

-- Table structure for table `tasks`

--


CREATE TABLE `tasks` (

`tid` int(4) NOT NULL auto_increment,

`p_id` int(4) NOT NULL default '0',

`task_description` text NOT NULL,

`complete_by` date NOT NULL default '0000-00-00',

PRIMARY KEY (`tid`)

) TYPE=MyISAM AUTO_INCREMENT=3 ;


--

-- Dumping data for table `tasks`

--


INSERT INTO `tasks` VALUES (1, 1, 'some secret stuff, hush hush', '0000-00-00');

INSERT INTO `tasks` VALUES (2, 2, 'hush, hush ', '0000-00-00');




 
 
>>> More PHP Articles          >>> More By David Web
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: