Vérification exportation + dossier pour les fichiers

This commit is contained in:
Michael RICOIS 2011-10-25 14:20:05 +00:00
parent d9f6a8ba8d
commit 8419bbcf31

View File

@ -6,7 +6,7 @@ class Exporter extends WsScore
{
protected $elements = array(
'naf' => array(
'desc' => "Codes NAF",
'desc' => "Codes NAF",
'entete' => array("codNaf", "libNaf"),
'sql' => "SELECT codNaf5 AS codNaf, libNaf5 AS libNaf FROM jo.tabNaf5 UNION SELECT codNaf700 AS codNaf, libNaf700 AS libNaf FROM jo.tabNaf4 ORDER BY codNaf",
),
@ -39,7 +39,9 @@ class Exporter extends WsScore
public function getDataCSV($key)
{
//Vérification
if (!array_key_exists($key, $this->elements)){
return false;
}
//Définition des valeurs
$sql = $this->elements[$key]['sql'];