|
Damion Mchenry
post date:
2010-12-10 19:11:07
|
By the way, this seems to only happen on the data grouped by category...here is the code:
I know it doesn't have an html code and such:
<?php require_once('../Connections/ixschart.php'); ?><?php require_once('../Connections/ixschart.php'); ?><?php include('../includes/FusionCharts/dynamic/DWFChart.inc.php'); ?><?php
// fusion chart # FusionChart4 data include
include('../includes/FusionCharts/dynamic/data/fc_FusionChart4_data.php');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
// fusion chart #FusionChart4 dynamic filter data
//get the dates.
$link = mysql_connect(HOST, OFFICIAL_USR, OFFICIAL_USR_PWRD);
$db_selected = mysql_select_db(OFFICIAL_MAIN_DB, $link);
$sql = "Select DATE_FORMAT(pluggins.date, '%Y') as mydate from pluggins ORDER BY pluggins.date ASC";
$result = mysql_query($sql);
if ($result == false) {
echo ("
<p class="style1"><font color=red size=2>There was an error on this page - Error 10777ac5e. Please report this error code to the site admin</font></p>");
echo mysql_errno().":".mysql_error()."<BR>";
exit;
}
$numofRows = mySQL_num_rows($result);
$numofRows = $numofRows - 1;
$oldest = mysql_result($result, 0, "mydate");
$newest = mysql_result($result, $numofRows, "mydate");
echo "<div align = center><form action = plugginslist.php>";
for ($i = $oldest; $i < $newest; $i++){
echo "<input type = radio name = year value = "$i">$i</input>";
}
echo " <input type = submit value = "View" name = "View">";
echo "</form></div>";
// fusion chart recordset
if ($_POST['year'] <> "") {
$yearq = $_POST['year'];
$extra = " AND DATE_FORMAT(pluggins.date, '%Y') = '$yearq' ";
echo "<BR><div align = center><strong><font size = "2">Pluggins for Year $yearq</font></strong></div>";
}else {
echo "<BR><div align = center><strong><font size = "2">Pluggins for All Years</font></strong></div>";
}
mysql_select_db($database_ixschart, $ixschart);
// fusion chart recordset
mysql_select_db($database_ixschart, $ixschart);
$fcquery_FusionChart4_rs0 = "SELECT pluggins.cname, pluggins.cname, count(pluggins.cname) AS xtd_value FROM pluggins WHERE 1 GROUP BY pluggins.cname;";
$FusionChart4_rs0 = mysql_query($fcquery_FusionChart4_rs0, $ixschart) or die(mysql_error());
$row_FusionChart4_rs0 = mysql_fetch_assoc($FusionChart4_rs0);
$totalRows_FusionChart4_rs0 = mysql_num_rows($FusionChart4_rs0);
?><?php
// fusion chart # FusionChart4 data include
include('../includes/FusionCharts/dynamic/data/fc_FusionChart4_data.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="../includes/FusionCharts/dynamic/js/FusionCharts.js"></script>
</head>
<body>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?
$dFCFusionChart4 = new DWFChart("FusionChart4", "Pie3D", "../includes/FusionCharts/charts/", 400, 400, "", "", "", "", "", "");
$dFCFusionChart4->setVersion("1.1.1");
$dFCFusionChart4->setConfigXML($FusionChart4_dataXML);
$dFCFusionChart4->setCategory($NoRecordset, "", "", "category");
$dFCFusionChart4->addSeries($FusionChart4_rs0, "pluggins.cname", "category_id_col=pluggins.cname;series_foreign_key=pluggins.id;category_label_col=pluggins.cname;category_table=pluggins;series_value_col=pluggins.cname;series_table=pluggins;series_calculation=count", "color='674295' seriesName='pluggins.cname'", "default", "");
$dFCFusionChart4->setOrdering('None', 'asc');
$dFCFusionChart4->prepareData();
?>
<?php
// (FCChart Begin) #FusionChart4
renderFusionChart($dFCFusionChart4, 400, 400);
// #FusionChart4 (FCChart End)
?>
</body>
</html>
<?php
mysql_free_result($FusionChart4_rs0);
?>
</body>
</html>
|
|
|
Cristian Dorobantescu [Extend Studio]
post date:
2010-12-11 11:21:18
|
Hi Damion,
Please make sure you have uploaded the /includes folder on the server. Also, are the databases the same (I understand you upload it on a server)?
Could you send us a link to the application at support@extendstudio.com to have a closer look?
Thanks,
Cristian
|
|
|
Andrei Rinciog [Extend Studio]
post date:
2011-02-25 07:32:24
|
Hello Gregor,
This is an error from the query builder that was not fixed yet. Please use recordsets instead. If you need help designing your recordsets please tell me your table structure and I can help you with the query.
Regards,
Andrei Rinciog
|
|