erme Posted February 15, 2010 Share Posted February 15, 2010 How can I write something like this? SELECT * FROM TableName ORDER BY RAND($rand) AND FieldName1 DESC Link to comment https://forums.phpfreaks.com/topic/192203-order-by-2-things/ Share on other sites More sharing options...
trq Posted February 15, 2010 Share Posted February 15, 2010 SELECT * FROM TableName ORDER BY RAND($rand) FieldName1 DESC Link to comment https://forums.phpfreaks.com/topic/192203-order-by-2-things/#findComment-1012880 Share on other sites More sharing options...
erme Posted February 16, 2010 Author Share Posted February 16, 2010 Doesn't seem to work Link to comment https://forums.phpfreaks.com/topic/192203-order-by-2-things/#findComment-1012890 Share on other sites More sharing options...
erme Posted February 16, 2010 Author Share Posted February 16, 2010 Need the comma SELECT * FROM TableName ORDER BY RAND($rand), FieldName1 DESC Link to comment https://forums.phpfreaks.com/topic/192203-order-by-2-things/#findComment-1012895 Share on other sites More sharing options...
jay7981 Posted February 16, 2010 Share Posted February 16, 2010 SELECT * FROM table ORDER BY field ASC/DESC, field ASC/DESC, field ASC/DESC....... Link to comment https://forums.phpfreaks.com/topic/192203-order-by-2-things/#findComment-1012959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.