1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| SELECT e.pm_id,
e.pm_number,
e.pm_title,
e.pm_description,
e.pm_campagne,
e.pm_completion,
e.pm_number_macif,
e.pm_horodatage,
from_unixtime(e.pm_modified, '%d/%m/%Y %H:%i') as date_modifcation,
from_unixtime(e.pm_created, '%d/%m/%Y') as date_creation,
from_unixtime(e.pm_planned_start, '%d/%m/%Y') as date_debut_prev,
from_unixtime(e.pm_planned_end, '%d/%m/%Y') as date_fin_prev,
from_unixtime(e.pm_real_start, '%d/%m/%Y') as date_debut_reel,
from_unixtime(e.pm_real_end, '%d/%m/%Y') as date_fin_reel,
(
select l2.pm_budget_lib
from egw_pm_budget_lib l2, egw_pm_projects e2
where e2.pm_status = l2.pm_budget_code
and e.pm_id = e2.pm_id
) as 'STATUT',
(
select l3.pm_budget_lib
from egw_pm_budget_lib l3, egw_pm_projects e3
where e3.pm_state = l3.pm_budget_code
and e.pm_id = e3.pm_id
) as 'STATE',
(
select l4.pm_budget_lib
from egw_pm_budget_lib l4, egw_pm_projects e4
where e4.pm_partenaire = l4.pm_budget_code
and e.pm_id = e4.pm_id
) as 'PARTENAIRE',
(
select l5.pm_budget_lib
from egw_pm_budget_lib l5, egw_pm_projects e5
where e5.pm_analytique = l5.pm_budget_code
and e.pm_id = e5.pm_id
) as 'AXE1',
(
select l6.pm_budget_lib
from egw_pm_budget_lib l6, egw_pm_projects e6
where e6.pm_type = l6.pm_budget_code
and e.pm_id = e6.pm_id
) as 'TYPE' ,
(
select concat(a.n_family,' ',a.n_given)
from egw_pm_roles r, egw_pm_members m, egw_addressbook a, egw_pm_projects e5
where e5.pm_id = e.pm_id
and e5.pm_id = m.pm_id
and m.role_id = r.role_id
and r.role_id = '5'
and m.member_uid = a.account_id
group by e5.pm_id
) as 'PILOTE'
FROM egw_pm_projects_histo e
WHERE e.pm_id= 1192; |
Partager