INSERT INTO project
(Name, Description, CreationDate, EstimateDuration, CompletionDate, CreatorID, ManagerID)
VALUES
(#Name#, #Description#, NOW(), #EstimateDuration#,
#CompletionDate, typeHandler=DateTimeTypeHandler#,
#CreatorUserName#, #ManagerUserName#)
select LAST_INSERT_ID() as value
UPDATE project SET Disabled = 1 WHERE ProjectID = #value#
INSERT INTO project_members (UserID, ProjectID)
VALUES(#username#, #project#)
DELETE FROM project_members WHERE ProjectID = #project# AND UserID = #username#
UPDATE project
SET
CompletionDate = #CompletionDate, typeHandler=DateTimeTypeHandler#,
Description = #Description#,
EstimateDuration = #EstimateDuration#,
ManagerId =#ManagerUserName#,
Name = #Name#
WHERE
ProjectID = #ID#