Ajout log dans la base

This commit is contained in:
Rodolphe Quiedeville 2005-03-22 09:35:15 +00:00
parent 1e4cd68c09
commit 708a0209f3

View File

@ -152,6 +152,33 @@ class GraphLignesCommandesWeek extends GraphBarAcc {
$this->LabelAngle = 0;
/*
* Insertion Base
*
*/
$type = "commandes.hebdomadaire";
$sql = "DELETE FROM ".MAIN_DB_PREFIX."telephonie_stats";
$sql .= " WHERE graph = '".$type."'";
$this->db->query($sql);
for ($i = 0 ; $i < sizeof($datas_new) ; $i++)
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_stats";
$sql .= " (graph, ord, valeur) VALUES (";
$sql .= "'".$type."'";
$sql .= ",'".$labels_new[$i]."'";
$sql .= ",'".$datas_new[$i]."');";
if (! $this->db->query($sql))
{
print $this->db->error();
}
}
/*
*
*
*/
$this->GraphDraw($this->file, $datas_new, $labels_new, $datas_new_rej);
}
}