Commit fca56c1f authored by JonathanMM's avatar JonathanMM

Erreur si aucune valeur récupéré dans la base de données

parent 598449f4
......@@ -11,8 +11,13 @@ $requete = $pdo->query('SELECT * FROM `statusConso` where nbStation Is not null
$conso = $requete->fetch();
//Stations
$requete = $pdo->query('SELECT * FROM status inner join `stations` on stations.code = status.code WHERE idConso = '.$conso['id'].' order by status.code asc');
$statusStation = $requete->fetchAll();
if(is_null($conso['id']))
$statusStation = array();
else
{
$requete = $pdo->query('SELECT * FROM status inner join `stations` on stations.code = status.code WHERE idConso = '.$conso['id'].' order by status.code asc');
$statusStation = $requete->fetchAll();
}
?>
<!DOCTYPE html>
<html>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment