Pagina 1 din 1

statistici cu php

Scris: Mie Mar 30, 2011
de trif
salut, am si eu o problema si nu stiu ca tot am cautat si nu mai stiu ce sa fac ca de la 0 nu stiu sa fac, as vrea sa fac pt un anumit site niste statistici si sa le pun in grafice cum sunt in excel dar nu stiu cum sa fac, imi puteti zice ceva site-uri unde as putea sa gasesc asa ceva sau asemanator ca il modific eu dupaia. nu conteaza in ce este facut in php, javascript ca dupaia il modific pt mysql daca se poate. daca ma ajutati mi-ar prinde foarte bine pt licenta. astept raspuns. va multumesc.

statistici cu php

Scris: Mie Mar 30, 2011
de MarPlo
Incearca http://www.phpmyvisites.us/" target="_blank
Sau cauta pe net: php script statistics

statistici cu php

Scris: Mie Mar 30, 2011
de trif
salut, am gasit ceva si ce merge dar acum vreau ca sa il leg de bd. si am facut asa

Cod: Selectaţi tot

<?php // content="text/plain; charset=utf-8"
require_once ('jpgraph.php');
require_once ('jpgraph_line.php');
include "conectare.php";
$sql="SELECT * FROM note "; 
$res=mysql_query($sql);
while($row=mysql_fetch_array($res)) {
   print($row['nota']."<br>");
}
$sql1="SELECT * FROM note"; 
$res1=mysql_query($sql1);
while($row1=mysql_fetch_array($res1)) {
   print($row1['nota']."<br>");
}
$sql2="SELECT * FROM note"; 
$res2=mysql_query($sql2);
while($row2=mysql_fetch_array($res2)) {
   print($row2['nota']."<br>");
}

$datay1 = $row['nota'].
$datay2 = $row1['nota'].
$datay3 = $row2['nota'].

// Setup the graph
$graph = new Graph(600,550);
$graph->SetScale("textlin");

$graph->img->SetAntiAliasing(false);
$graph->title->Set('Filled Y-grid');
$graph->SetBox(false);

$graph->img->SetAntiAliasing();

$graph->yaxis->HideZeroLabel();
$graph->yaxis->HideLine(false);
$graph->yaxis->HideTicks(false,false);

$graph->xgrid->Show();
$graph->xgrid->SetLineStyle("solid");
$graph->xaxis->SetTickLabels(array('A','B','C','D'));
$graph->xgrid->SetColor('#E3E3E3');

// Create the first line
$p1 = new LinePlot($datay1);
$graph->Add($p1);
$p1->SetColor("#6495ED");
$p1->SetLegend('Studentul 1');

// Create the second line
$p2 = new LinePlot($datay2);
$graph->Add($p2);
$p2->SetColor("#B22222");
$p2->SetLegend('Studentul 2');

// Create the third line
$p3 = new LinePlot($datay3);
$graph->Add($p3);
$p3->SetColor("#FF1493");
$p3->SetLegend('Studentul 3');

$graph->legend->SetFrameWeight(1);

// Output line
$graph->Stroke();

?>
si imi arata in afara dar la grafic imi da eroarea asta

Cod: Selectaţi tot

Catchable fatal error: Object of class Graph could not be converted to string in
. nu stiu ce sa ii fac. multumesc pt raspunul de mai sus.

statistici cu php

Scris: Joi Mar 31, 2011
de trif
salut, am facut asa

Cod: Selectaţi tot

<?php // content="text/plain; charset=utf-8"
require_once ('jpgraph.php');
require_once ('jpgraph_line.php');
include "conectare.php";
$array = array();
$query="SELECT * FROM note"; 
$result = mysql_query($query);
while ($nota = mysql_fetch_array($result)) {
	$array[] = $nota['valoare'];
}

$datay1 = $array;

// Setup the graph
$graph = new Graph(600,550);
$graph->SetScale("textlin");

$graph->img->SetAntiAliasing(false);
$graph->title->Set('Filled Y-grid');
$graph->SetBox(false);

$graph->img->SetAntiAliasing();

$graph->yaxis->HideZeroLabel();
$graph->yaxis->HideLine(false);
$graph->yaxis->HideTicks(false,false);

$graph->xgrid->Show();
$graph->xgrid->SetLineStyle("solid");
$graph->xaxis->SetTickLabels(array('A','B','C','D'));
$graph->xgrid->SetColor('#E3E3E3');

// Create the first line
$p1 = new LinePlot($datay1);
$graph->Add($p1);
$p1->SetColor("#6495ED");
$p1->SetLegend('Studentul 1');

$graph->legend->SetFrameWeight(1);

// Output line
$graph->Stroke();

?>
si merge dar acum cum as putea sa fac ca sa nu ii pun eu cnp=... ci sa il tastez de la tastatura ca sa prea de acolo. cum as putea? multumesc.