1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
// j'etablis ma requête
$sql = "SELECT COUNT( * )as click ,benifits_degree, e1.`e-Call_benifits_id` as qst
FROM `e-call_benefits_table` e1, `user_e-call_benifits_table` e2, `user_table` u
WHERE e1.`e-Call_benifits_id` = e2.`e-Call_benifits_id`
AND e2.user_id = u.user_id
AND benifits_degree=1 GROUP BY qst
";
$result = mysql_query($sql, $link) or die(mysql_error());
while ($resultat = mysql_fetch_array($result))
//je recupère mes donnée dans un tableau
{ $click[] = $resultat['click'];
}
// Create the bar plots
$b1plot = new BarPlot($click);
$b2plot = new BarPlot($click1);
$b3plot = new BarPlot($click2);
$b4plot = new BarPlot($click3);
$b5plot = new BarPlot($click4);
$gbplot = new groupBarPlot(array($b1plot,$b2plot,$b3plot,$b4plot,$b5plot));
// ...and add it to the graPH
$graph->Add($gbplot); |
Partager