par
maxredphenix » 04 oct. 2012, 20:05
J'ai tenté ceci:
SELECT date_appel, d.id, idCorrectif, intervention_id, AVG(SUM((TIMESTAMPDIFF(SECOND,debut_inter,fin_inter)) - (TIME_TO_SEC(tps_acces_signature)))) AS moyenne
FROM correctif AS c LEFT JOIN demande AS d ON c.id_appel = d.id LEFT JOIN work_times AS w ON intervention_id=c.id_appel
WHERE MONTH(date_appel)=$mois AND YEAR(date_appel)=$annee AND type_inter = 'Correctif' AND statut='Cloturé'
SELECT date_appel, d.id, idCorrectif, intervention_id, AVG((SUM(TIMESTAMPDIFF(SECOND,debut_inter,fin_inter))) - (SUM(TIME_TO_SEC(tps_acces_signature)))) AS moyenne
FROM correctif AS c LEFT JOIN demande AS d ON c.id_appel = d.id LEFT JOIN work_times AS w ON intervention_id=c.id_appel
WHERE MONTH(date_appel)=$mois AND YEAR(date_appel)=$annee AND type_inter = 'Correctif' AND statut='Cloturé'
J'ai beau chercher je vois pas, toujours la même erreur.
J'ai tenté ceci:
[sql]SELECT date_appel, d.id, idCorrectif, intervention_id, AVG(SUM((TIMESTAMPDIFF(SECOND,debut_inter,fin_inter)) - (TIME_TO_SEC(tps_acces_signature)))) AS moyenne
FROM correctif AS c LEFT JOIN demande AS d ON c.id_appel = d.id LEFT JOIN work_times AS w ON intervention_id=c.id_appel
WHERE MONTH(date_appel)=$mois AND YEAR(date_appel)=$annee AND type_inter = 'Correctif' AND statut='Cloturé'[/sql]
[sql]SELECT date_appel, d.id, idCorrectif, intervention_id, AVG((SUM(TIMESTAMPDIFF(SECOND,debut_inter,fin_inter))) - (SUM(TIME_TO_SEC(tps_acces_signature)))) AS moyenne
FROM correctif AS c LEFT JOIN demande AS d ON c.id_appel = d.id LEFT JOIN work_times AS w ON intervention_id=c.id_appel
WHERE MONTH(date_appel)=$mois AND YEAR(date_appel)=$annee AND type_inter = 'Correctif' AND statut='Cloturé'[/sql]
J'ai beau chercher je vois pas, toujours la même erreur.