par
cricriguignard » 07 janv. 2022, 12:20
pbarroca, mes colonnes s'affichent en double et je ne voudrais pas fairee afficher toutes les colonnes. comment je peux faire ?
$sql = "SELECT `projett`.`idprojet`,`projett`.`idchefprojet`,`projett`.`nomprojet`,`projett`.`description`,`projett`.`idetat`,`projett`.`idpriorite`,`projett`.`datefin`,`projett`.`dateprisecharge`, `chefprojet`.`nomchefprojet`,`chefprojet`.`prenomchefprojet`,`marque`.`nommarque`,`perimetre`.`nomperimetre`,`typologie`.`nomtypologie`,`etat`.`nometat`,".
"`priorite`.`nompriorite` ".
"FROM `projett` ".
"INNER JOIN `chefprojet` ON `chefprojet`.`idchefprojet` = `projett`.`idchefprojet` ".
"INNER JOIN `marque` ON `marque`.`idmarque` = `projett`.`idmarque` ".
"INNER JOIN `perimetre` ON `perimetre`.`idperimetre` = `projett`.`idperimetre` ".
"INNER JOIN `typologie` ON `typologie`.`idtypologie` = `projett`.`idtypologie` ".
"INNER JOIN `etat` ON `etat`.`idetat` = `projett`.`idetat` ".
"INNER JOIN `priorite` ON `priorite`.`idpriorite` = `projett`.`idpriorite` ".
"WHERE `projett`.`idprojet` LIKE '%$numidprojet_selectionnee%' AND `projett`.`idetat` NOT LIKE 5 ;";
$result_select = mysql_query($sql) or die(mysql_error());
$result_list = array();
while($row = mysql_fetch_array($result_select))
$result_list[] = $row;
//j'aimerai ces colonnes $csv = "Nom du projet;Chef de projet;Marque;Perimetre;Typologie;Ville;Date prise en charge;Date de fin;Etat;Priorite;Description;\n";
$fp_csv = fopen('php://memory', 'w+');
foreach($result_list as $donnees)
{
fputcsv($fp_csv, $donnees, ';');
}
rewind($fp_csv);
$csv = stream_get_contents($fp_csv);
pbarroca, mes colonnes s'affichent en double et je ne voudrais pas fairee afficher toutes les colonnes. comment je peux faire ?
$sql = "SELECT `projett`.`idprojet`,`projett`.`idchefprojet`,`projett`.`nomprojet`,`projett`.`description`,`projett`.`idetat`,`projett`.`idpriorite`,`projett`.`datefin`,`projett`.`dateprisecharge`, `chefprojet`.`nomchefprojet`,`chefprojet`.`prenomchefprojet`,`marque`.`nommarque`,`perimetre`.`nomperimetre`,`typologie`.`nomtypologie`,`etat`.`nometat`,".
"`priorite`.`nompriorite` ".
"FROM `projett` ".
"INNER JOIN `chefprojet` ON `chefprojet`.`idchefprojet` = `projett`.`idchefprojet` ".
"INNER JOIN `marque` ON `marque`.`idmarque` = `projett`.`idmarque` ".
"INNER JOIN `perimetre` ON `perimetre`.`idperimetre` = `projett`.`idperimetre` ".
"INNER JOIN `typologie` ON `typologie`.`idtypologie` = `projett`.`idtypologie` ".
"INNER JOIN `etat` ON `etat`.`idetat` = `projett`.`idetat` ".
"INNER JOIN `priorite` ON `priorite`.`idpriorite` = `projett`.`idpriorite` ".
"WHERE `projett`.`idprojet` LIKE '%$numidprojet_selectionnee%' AND `projett`.`idetat` NOT LIKE 5 ;";
$result_select = mysql_query($sql) or die(mysql_error());
$result_list = array();
while($row = mysql_fetch_array($result_select))
$result_list[] = $row;
//j'aimerai ces colonnes $csv = "Nom du projet;Chef de projet;Marque;Perimetre;Typologie;Ville;Date prise en charge;Date de fin;Etat;Priorite;Description;\n";
$fp_csv = fopen('php://memory', 'w+');
foreach($result_list as $donnees)
{
fputcsv($fp_csv, $donnees, ';');
}
rewind($fp_csv);
$csv = stream_get_contents($fp_csv);