显示错误-Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /DW/app/web/dms/src/syleix.php on line 15--(就是while  ($array=mysql_fetch_array($query)) 这行)JpGraph Error Empty input data array specified for plot. Must have at least one data point.为什么啊?怎么解决啊~急死了<?php
include("../inc/dblogin.inc");
include ("../jp/jpgraph.php");
include ("../jp/jpgraph_line.php");
include ("../jp/jpgraph_bar.php");
include ("../inc/conn_shmcc.inc");
function yScaleCallback($aVal) {
    return number_format($aVal);
}
$stitle='类型数量趋势图(201208)';$query=mysql_query("select ANSWER_TYPE AS leix,count(1) as xj from om_log_ask_detail_201208 where xj>0  group by leix ",$con);$i = 0;
while  ($array=mysql_fetch_array($query)) {
$ydata[$i] = $array['xj'];
    $datax[$i] = $array['leix'];
$i++;
}
$graph = new Graph(1000,500,'auto');    
$graph->img->SetMargin(80,30,30,110);
$graph->SetScale("textint");
$graph->SetMarginColor("lightblue");
$graph->SetShadow();$graph->yaxis->scale->SetGrace(30);
$graph->yaxis->SetLabelFormatCallback('yScaleCallback');$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_SIMSUN,FS_BOLD);
$graph->xaxis->SetLabelAngle(45);$graph->title->Set($stitle);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);$graph->yaxis->title->Set("类型数量");
$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
                              
// Create a bar pot
$bplot = new BarPlot($ydata);
$bplot->SetFillColor("orange");
$bplot->SetFillGradient("navy","#EEEEEE",GRAD_LEFT_REFLECTION);
$bplot->SetWidth(0.5);
$bplot->SetShadow();$bplot->value->Show();$bplot->value->SetFont(FF_ARIAL,FS_BOLD);
$bplot->value->SetAngle(45);
$bplot->value->SetColor("black","darkred");
$graph->Add($bplot);$graph->Stroke();
?>