Pete Winter
asked on
Php "Order By" not working correctly.
See my below code.
The order by brand is not coming out in the correct order. Could this be something to do with the alias or group by?
$query_rs_media_new_group = "SELECT supplier_code, title, url, description, description_item, brand, type, weight, category, section, width, label_artwork, min(id) as id
FROM media_new
WHERE media_binder = '1'
GROUP BY title
ORDER BY brand";
$rs_media_new_group = mysql_query($query_rs_media_new_group, $conn_cmyuk) or die(mysql_error());
$row_rs_media_new_group = mysql_fetch_assoc($rs_media_new_group);
$totalRows_rs_media_new_group = mysql_num_rows($rs_media_new_group);
The order by brand is not coming out in the correct order. Could this be something to do with the alias or group by?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER