This is the query I'm using...
code:
$query = "SELECT * FROM (SELECT * FROM outside ORDER BY id DESC LIMIT $limit) AS foo ORDER BY id ASC";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
$dataset1[] = array(($row['unixtime'] * 1000 ),$row['temperature']);
}
So I'm sorting by "id" and it's set as an INDEX. Should this also be a Primary Key?
EDITED: 6 May 2013 19:13 by ANT_THOMAS