ccrevcypsys Posted November 8, 2007 Share Posted November 8, 2007 I am trying to display the songs in an album but when i use the order by track it goes 1 then 10 then 11 then 2 then 3 then 4 so on an so fourth. i need it to go like any album does. 1 2 3 4 5 6 7 8 9 10 11. heres my code $query = "SELECT i.*,c.screenname,c.customer_id FROM ".$glob['dbprefix']."StreamRush_inventory i LEFT JOIN ".$glob['dbprefix']."StreamRush_customer c ON c.customer_id=i.customer_id WHERE i.album_id=".$_GET['album_id']." ORDER BY productCode ASC"; how do i stop that from happening? Link to comment https://forums.phpfreaks.com/topic/76565-order-by-problems/ Share on other sites More sharing options...
pocobueno1388 Posted November 8, 2007 Share Posted November 8, 2007 Well, you are ordering by "productCode"...does that have something to do with the tracks? It's hard to help you without knowing the setup of your database. Link to comment https://forums.phpfreaks.com/topic/76565-order-by-problems/#findComment-387762 Share on other sites More sharing options...
ccrevcypsys Posted November 8, 2007 Author Share Posted November 8, 2007 yes yes it does.. sorry i forgot to post that. it is the tracks name so what im trying to say is productCode==tracks Link to comment https://forums.phpfreaks.com/topic/76565-order-by-problems/#findComment-387766 Share on other sites More sharing options...
pocobueno1388 Posted November 8, 2007 Share Posted November 8, 2007 Well, if that is the tracks name, then what do you expect it to do? Obviously it is going to order by the name, and not the track. Could you post your database table setup? Link to comment https://forums.phpfreaks.com/topic/76565-order-by-problems/#findComment-387773 Share on other sites More sharing options...
ccrevcypsys Posted November 8, 2007 Author Share Posted November 8, 2007 ----Inventory---- productId (the key id auto incriments) productCode (what number the track is) images file_location album_id Link to comment https://forums.phpfreaks.com/topic/76565-order-by-problems/#findComment-387836 Share on other sites More sharing options...
pocobueno1388 Posted November 8, 2007 Share Posted November 8, 2007 And where exactly are the tracks? Link to comment https://forums.phpfreaks.com/topic/76565-order-by-problems/#findComment-387838 Share on other sites More sharing options...
ccrevcypsys Posted November 9, 2007 Author Share Posted November 9, 2007 Dude they are the productCode row... ive told you that like nine times Link to comment https://forums.phpfreaks.com/topic/76565-order-by-problems/#findComment-388010 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.