mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
SQL for a view of infolog table using real account-names and timestamps
This commit is contained in:
parent
2dac72f0da
commit
07d22ef3be
23
infolog/doc/create-view.sql
Normal file
23
infolog/doc/create-view.sql
Normal file
@ -0,0 +1,23 @@
|
||||
CREATE VIEW infolog AS
|
||||
SELECT info_id,info_type,info_subject,info_des,
|
||||
owner.account_lid AS info_owner,
|
||||
info_responsible, /* ToDo */
|
||||
info_access,
|
||||
egw_categories.cat_name,
|
||||
from_unixtime(info_datemodified) AS info_datemodified,
|
||||
(CASE info_startdate WHEN 0 THEN NULL ELSE from_unixtime(info_startdate) END) AS info_startdate,
|
||||
(CASE info_enddate WHEN 0 THEN NULL ELSE from_unixtime(info_enddate) END) AS info_enddate,
|
||||
info_id_parent, /* ToDo */
|
||||
info_planned_time,info_replanned_time,info_used_time,
|
||||
info_status,
|
||||
modifier.account_lid AS info_modifier,
|
||||
info_percent,
|
||||
(CASE info_datecompleted WHEN 0 THEN NULL ELSE from_unixtime(info_datecompleted) END) AS info_datecompleted,
|
||||
info_location,info_uid,info_cc,
|
||||
from_unixtime(info_created) AS info_created,
|
||||
creator.account_lid AS info_creator
|
||||
FROM `egw_infolog`
|
||||
JOIN egw_accounts owner ON abs(info_owner)=owner.account_id
|
||||
JOIN egw_accounts creator ON info_creator=creator.account_id
|
||||
LEFT JOIN egw_categories ON info_cat=cat_id
|
||||
LEFT JOIN egw_accounts modifier ON info_modifier=modifier.account_id
|
Loading…
Reference in New Issue
Block a user