as you support was very usefull this night, I have another question, an I am
afraid that this will not be the last one ;-).
Can you give me a link or the information where I find a documentation who
PHPLOT is working together?
I need a documentation or tutorial for beginners.
I have create a Table with php, by selected the data in a mysql DB.
Now need to creat the $data for phplot.
<?phprequire_once('konfiguration.php');//Here are the connection Information $db_link=mysql_connect(MYSQL_HOST,MYSQL_BENUTZER,MYSQL_KENNWORT);//Connetcion to db$db_sel=mysql_select_db(MYSQL_DATENBANK)ordie("Auswahl der Datenbank fehlgeschlagen");$sql="SELECT * FROM workstations_history";$db_erg=mysql_query($sql);if(!$db_erg){die('Error!: '.mysql_error());}echo'<table border="1">';echo"<tr>";echo"<td>Datum</td>";echo"<td>Anzahl </td>";echo"</tr>";while($row=mysql_fetch_array($db_erg,MYSQL_ASSOC)){echo"<tr>";echo"<td>".$row['wsh_date']."</td>";echo"<td>".$row['wsh_anzahl']."</td>";echo"</tr>";}echo"</table>";mysql_free_result($db_erg);require'phplot.php';//I need to generate this automatically$data=array(array('01.09.2010',289),array('01.10.2010',295),array('01.11.2010 ',276));$plot=newPHPlot();$plot->SetDataValues($data);$plot->SetTitle('First Test Plot');$plot->SetIsInline(True);$plot->SetOutputFile("./temporary.png");$plot->DrawGraph();echo"<img src= './temporary.png' />";echo"<html><body>";
?>
Thank you!
RPOP
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Glad it's working, but you should not have to query the database twice.
(Probably not a good idea anyway, as you might get different results the
second time.) You can build the PHP data array, row by row, as you loop
through the query results outputting your table. I also recommend always using
an ORDER BY clause in the query so you get predictable results.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
as you support was very usefull this night, I have another question, an I am
afraid that this will not be the last one ;-).
Can you give me a link or the information where I find a documentation who
PHPLOT is working together?
I need a documentation or tutorial for beginners.
I have create a Table with php, by selected the data in a mysql DB.
Now need to creat the $data for phplot.
?>
Thank you!
RPOP
sorry,
I mean
? working together with MYSQL
RPOP
Try this:
https://sourceforge.net/projects/phplot/forums/forum/46382/topic/3804463?mess
age=8566589
Yes, thank you!
My problem was that I used teh result from teh SQL query once for teh cration
of teh table and a second time for the phplot.
In fact I have to start the query twice, to be able to use the result in both
(table and phplot)
Now it's working.
RPOP
Glad it's working, but you should not have to query the database twice.
(Probably not a good idea anyway, as you might get different results the
second time.) You can build the PHP data array, row by row, as you loop
through the query results outputting your table. I also recommend always using
an ORDER BY clause in the query so you get predictable results.