Ajout test sur le nombre de valeur

This commit is contained in:
Rodolphe Quiedeville 2005-08-08 14:32:58 +00:00
parent edb184a11d
commit 9f8a2a6537

View File

@ -168,6 +168,7 @@ if ($resql_c)
$file= DOL_DATA_ROOT."/energie/graph/day.".$obj_c->rowid.".png"; $file= DOL_DATA_ROOT."/energie/graph/day.".$obj_c->rowid.".png";
if (sizeof($gdatas) > 2)
$graph->Stroke($file); $graph->Stroke($file);
$width = 450; $width = 450;
@ -204,6 +205,7 @@ if ($resql_c)
$file= DOL_DATA_ROOT."/energie/graph/month.".$obj_c->rowid.".png"; $file= DOL_DATA_ROOT."/energie/graph/month.".$obj_c->rowid.".png";
if (sizeof($gmdatas))
$graph->Stroke($file); $graph->Stroke($file);
// Hebdomadaire // Hebdomadaire
@ -238,6 +240,7 @@ if ($resql_c)
$file= DOL_DATA_ROOT."/energie/graph/week.".$obj_c->rowid.".png"; $file= DOL_DATA_ROOT."/energie/graph/week.".$obj_c->rowid.".png";
if (sizeof($gwdatas))
$graph->Stroke($file); $graph->Stroke($file);
// Annuel // Annuel
@ -272,11 +275,13 @@ if ($resql_c)
$file= DOL_DATA_ROOT."/energie/graph/year.".$obj_c->rowid.".png"; $file= DOL_DATA_ROOT."/energie/graph/year.".$obj_c->rowid.".png";
if (sizeof($gydatas))
$graph->Stroke($file); $graph->Stroke($file);
} }
else else
{ {
dolibarr_syslog("Erreur SQL"); dolibarr_syslog("Erreur SQL");
dolibarr_syslog("$sql");
} }
$i_c++; $i_c++;
} }
@ -285,6 +290,7 @@ if ($resql_c)
else else
{ {
dolibarr_syslog("Erreur SQL"); dolibarr_syslog("Erreur SQL");
dolibarr_syslog($db->error($resql_c));
} }