Jal Table de référence : revue sql d'export CodeJournal

This commit is contained in:
Michael RICOIS 2015-12-04 15:31:03 +00:00
parent 89abfca252
commit d69fcc5d0f

View File

@ -45,10 +45,13 @@ $requests = array(
'REF_CodeJournal_' => array( 'REF_CodeJournal_' => array(
'header' => array('id', 'nomJALedition', 'parution', 'parutionJours', 'aboDateDeb', 'aboDateFin', 'priorite'), 'header' => array('id', 'nomJALedition', 'parution', 'parutionJours', 'aboDateDeb', 'aboDateFin', 'priorite'),
'columns' => array('id', 'nomJALedition', 'parution', 'parutionJours', 'aboDateDeb', 'aboDateFin', 'priorite'), 'columns' => array('id', 'nomJALedition', 'parution', 'parutionJours', 'aboDateDeb', 'aboDateFin', 'priorite'),
'sql' => "SELECT jal.id, jal.nomJALedition, jal.parution, jal.parutionJours, abo.aboDateDeb, abo.aboDateFin, 'sql' => "SELECT jal.id, jal.nomJALedition, jal.parution, jal.parutionJours, jalabo.aboDateDeb, jalabo.aboDateFin,
IF(jalPrioritaire=1,'A',IF(parution='Q','C','B')) AS priorite IF(jal.jalPrioritaire=1,'A',IF(jal.parution='Q','C','B')) AS priorite
FROM jo.tabJALed AS jal LEFT JOIN jo.tabJALabo AS abo ON jal.id = abo.jalId FROM jo.tabJALed AS jal
WHERE jal.dateSuppr=0", JOIN ( SELECT abo.jalId, abo.aboDateDeb, abo.aboDateFin FROM jo.tabJALabo AS abo
GROUP BY abo.jalId ORDER BY abo.aboDateFin DESC
) AS jalabo ON jalabo.jalId = jal.id
WHERE jal.dateSuppr=0 ORDER BY jal.id",
), ),
'REF_CodeFormeJuridique_' => array( 'REF_CodeFormeJuridique_' => array(
'header' => array('code', 'libelle', 'libelleCourt'), 'header' => array('code', 'libelle', 'libelleCourt'),
@ -67,7 +70,14 @@ $requests = array(
'sql' => "SELECT triId, triCode, triType, triNom, triVille 'sql' => "SELECT triId, triCode, triType, triNom, triVille
FROM jo.tribunaux FROM jo.tribunaux
WHERE triType IN ('L', 'C', 'I', 'G', 'M');", WHERE triType IN ('L', 'C', 'I', 'G', 'M');",
) ),
/*'REF_Evenements' => array(
'header' => array('triId', 'triCode', 'triType', 'triNom', 'triVille'),
'columns' => array('triId', 'triCode', 'triType', 'triNom', 'triVille'),
'sql' => "SELECT triId, triCode, triType, triNom, triVille
FROM jo.tribunaux
WHERE triType IN ('L', 'C', 'I', 'G', 'M');",
),*/
); );
$dateBegin = date('YmdHis'); $dateBegin = date('YmdHis');