My code:
$afer_result = mysql_query("SELECT * FROM aq_afers WHERE aferId = '".$afer_id."'");
while ($afer = mysql_fetch_array($afer_result)) {
$item_result = mysql_query("SELECT * FROM aq_".$afer['ItemCategory']."s WHERE ItemId = '".$afer['ItemId']."' ORDER BY ItemLevel");
$item = mysql_fetch_assoc($item_result);
echo $item['ItemLevel'];
echo "\n";
}
I expect the output to be a list of numbers to be sorted from lowest to highest, but this is what my output looks like:
10
37
62
15
35
55
75
95
105
70
40
50
15
35
1
55
Any idea why ORDER BY
is not working as I expect it to?