Am si eu nevoie de un pic de ajutor degat de niste grefice !
Am urmatorul cod !
Cod: Selectaţi tot
<?php
include('/phplot/phplot.php');
include 'conectare.php';
$rezultat=mysql_query("SELECT
tblusers.username,
tblsource_code.SourceCode
from tblusers
LEFT JOIN
tblsource_code
on tblusers.IdUser = tblsource_code.IdUser
where access=1");
$rezultat2=count($rezultat);
$i=0;
while($date = mysql_fetch_array($rezultat)){
$data[$i]=array($date['username'],$date['SourceCode']);
$i++;
}
$plot = new PHPlot(800, 600);
$plot->SetImageBorderType('plain');
$plot->SetPlotType('bars');
$plot->SetDataType('text-data');
$plot->SetDataValues($data);
$plot->SetTitle('Activiti');
$plot->SetLegend(array('SourceCode'));
$plot->SetXTickLabelPos('none');
$plot->SetXTickPos('none');
$plot->DrawGraph();
?>
Cum pot sa fac sa selectez toti useri si la fiecare user sami arete cate sourcecoduri are fiecare in tabel !
Datele se afla in 2 tabele : tbluser - IdUser,username,password,email, tip, si tabelu tblsource_code - id,IdUser,SourceCode ,data
Multumesc !