/* ---------------------------------------------------------------- */ /* The following script is a sample script designed to demonstrate */ /* a method for creating real-time dynamic pie charts from data */ /* held within databases. */ /* */ /* This sample connects to a MySQL database and reads data from */ /* a table "SalesBar". It then constructs the html page dynamically */ /* inserting the values from the result set into the parameters of */ /* the Line Graph Applet. */ /* */ /* You may freely copy and modify this script to suite your own */ /* requirements. */ /* */ /* ---------------------------------------------------------------- */ \n"; print "\n"; print "3D Line Graph\n"; print "\n"; print "\n"; print "\n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; $data_num = 1; while ($line = mysql_fetch_array($result1, MYSQL_ASSOC)) { foreach ($line as $col_value) { print "\n"; } $data_num = $data_num +1; } $data_num = 1; while ($line = mysql_fetch_array($result2, MYSQL_ASSOC)) { foreach ($line as $col_value) { print "\n"; } $data_num = $data_num +1; } print " \n"; print "\n"; print " \n"; print "\n"; print "\n"; /* Free resultset */ mysql_free_result($result1); mysql_free_result($result2); /* Closing connection */ mysql_close($link); ?>