$query=mysql_query($SQL);
while($row = mysql_fetch_array($query)){
$xdata[]=$row['EventDate'];
$ydata[]=intval($row['data']);
}
$data_arr=array($xdata,$ydata)
json_encode($data_arr);
$.ajax({
type: "Get",
url: "columndata.php?r=" + Math.floor(Math.random() * 1000 + 1),
data: { 'BeginTime': "" + beginTime + "", "EndTime": "" + endTime + "" , "keyword": "" + keyword + "" },
dataType: "text",
global: false,
async: false,
success: function (strReult) {
if (strReult == "-1") { alert("fail!"); return; }
},
error: function () {
alert("fail!");
}
});