INSERT INTO time_entry(
EntryCreated,
Duration,
Description,
CategoryID,
EntryDate,
CreatorID,
UserID
)
VALUES(
NOW(),
#Duration#,
#Description#,
#Category.ID#,
#ReportDate, typeHandler=DateTime#,
#CreatorUserName#,
#Username#
)
select LAST_INSERT_ID() as value
DELETE FROM time_entry WHERE EntryID = #value#
UPDATE time_entry SET
Duration = #Duration#,
Description = #Description#,
CategoryID = #Category.ID#,
EntryDate = #ReportDate, typeHandler=DateTime#,
UserID = #Username#
WHERE
EntryID = #ID#