I am trying to make a graph from data that i have in my sql database. Below is the exmaple of the data that i am pulling from my data base.
Region LC_count MC_count NC_count B_count LL_count EL_count LR_count CR_count
MOUNTAIN 0 722 542 0 7155 0 0 1444
NO.CAL/NEVADA 0 0 0 13 0 0 0 0
PACIFIC NORTHWEST 25 0 0 24 0 4848 0 414
SOUTHERN_CALIFORNIA 0 0 14514 0 245 3044 0 1470
SOUTHWEST 0 618 0 1 2958 0 0 1319
Here is the sql data that i am using
mysql_select_db($database_TechSupport, $TechSupport);
$query_Atotal = sprintf("SELECT `MailingList`.`Region`,
Sum(CASE WHEN(`CellLoad`.`Vendor` = 'Lucent' AND `CellLoad`.`Event` = 'Cell' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE`) THEN Total1 ELSE 0 END) AS LtotalC,
Sum(CASE WHEN(`CellLoad`.`Vendor` = 'Moto' AND `CellLoad`.`Event` = 'Cell' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE`) THEN Total1 ELSE 0 END) AS MtotalC,
Sum(CASE WHEN(`CellLoad`.`Vendor` = 'Nortel' AND `CellLoad`.`Event` = 'Cell' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE` ) THEN Total1 ELSE 0 END) AS NtotalC,
Sum(CASE WHEN(`CellLoad`.`Vendor` = 'Lucent' AND `CellLoad`.`Event` = 'BWM' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE` ) THEN Total1 ELSE 0 END) AS LtotalB,
Sum(CASE WHEN(`CellLoad`.`Event` = 'Lucent_LTE' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE`) THEN Total1 ELSE 0 END) AS LtotalL,
Sum(CASE WHEN(`CellLoad`.`Event` = 'Ericsson_LTE' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE`) THEN Total1 ELSE 0 END) AS EtotalL,
Sum(CASE WHEN(`CellLoad`.`Event` = 'Lucent_Router' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE`) THEN Total1 ELSE 0 END) AS LtotalR,
Sum(CASE WHEN(`CellLoad`.`Event` = 'Cisco_Router' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE`) THEN Total1 ELSE 0 END) AS CtotalR,
Sum(CASE WHEN(`CellLoad`.`Event` = 'Cell' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE` ) THEN Total1 ELSE 0 END) AS Tcell,
Sum(CASE WHEN(`CellLoad`.`Event` = 'BWM' AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE` ) THEN Total1 ELSE 0 END) AS Tbwm,
Sum(CASE WHEN((`CellLoad`.`Event` = 'Lucent_LTE' OR `CellLoad`.`Event` = 'Ericsson_LTE') AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE`) THEN Total1 ELSE 0 END) AS Tlte,
Sum(CASE WHEN((`CellLoad`.`Event` = 'Lucent_Router' OR `CellLoad`.`Event` = 'Cisco_Router') AND `CellLoad`.`Switch` = `MailingList`.`Switch` AND `CellLoad`.`NE` = `MailingList`.`NE`) THEN Total1 ELSE 0 END) AS Trouter
FROM CellLoad,MailingList
WHERE YEAR(`CellLoad`.`Date_Start`) = '2014' AND `MailingList`.`Area` = 'WEST' AND `CellLoad`.`Put_on_Schedule` = ('Email' or 'Done')
GROUP BY `MailingList`.`Region`
ORDER BY `MailingList`.`Region`", GetSQLValueString($col_Rtotal, "text"));
$Atotal = mysql_query($query_Atotal, $TechSupport) or die(mysql_error());
$row_Atotal = mysql_fetch_assoc($Atotal);
$totalRows_Atotal = mysql_num_rows($Atotal);
Here is the code for the for the graph
// get form data
if(count($_REQUEST)) foreach($_REQUEST as $name => $val) eval('$' . $name . ' = "' . $val . '";');
// initialize values
if(!$graphCreate)
{
$graphType = 'vBar';
$graphShowValues = 1;
$graphLabels = $row_Atotal['Region'];
$graphValues = $row_Atotal['LtotalC'].','.$row_Atotal['MtotalC'].','.$row_Atotal['NtotalC'].','.$row_Atotal['LtotalB'].','.$row_Atotal['LtotalL'].','.$row_Atotal['EtotalL'].','.$row_Atotal['CtotalR'].','.$row_Atotal['LtotalR'];
$graphBarWidth = 20;
$graphBarLength = '1.0';
$graphLabelSize = 12;
$graphValuesSize = 12;
$graphPercSize = 12;
$graphPadding = 10;
$graphBGColor = '#ABCDEF';
$graphBorder = '1px solid blue';
$graphBarColor = '#A0C0F0';
$graphBarBGColor = '#E0F0FF';
$graphBarBorder = '2px outset white';
$graphLabelColor = '#000000';
$graphLabelBGColor = '#C0E0FF';
$graphLabelBorder = '2px groove white';
$graphValuesColor = '#000000';
$graphValuesBGColor = '#FFFFFF';
$graphValuesBorder = '2px groove white';
}
else
{
if($graphBarWidth == '') $graphBarWidth = 0;
if($graphBarLength == '') $graphBarLength = 0;
if($graphLabelSize == '') $graphLabelSize = 0;
if($graphValuesSize == '') $graphValuesSize = 0;
if($graphPercSize == '') $graphPercSize = 0;
if($graphPadding == '') $graphPadding = 0;
}
how do i get my data into a graph. I am using HTML-Graphs