i have a php backend
$query = "SELECT value FROM changes WHERE stock_id={$id}";
$results = mysql_query($query, $connection);
while ($row = mysql_fetch_array($results)) {
$values[]=$row['value'];
}
echo json_encode($values);
and this is my javascript
$.ajax({
url: 'data.php',
data: {id: stock},
type: 'get',
success: function(data) {
$.jqplot ('graph-container', data);
}
});
the console shows no data specified error
Note: im using a one dimentional array ie, i expect array like [25,15,3656,65]