scarhand Posted February 22, 2010 Share Posted February 22, 2010 lets say i have 3 words under the field "fruit_name": apple orange grape and i want to order them in that specific order (so i can't use 'fruit_name' ASC or DESC), what clause would i use? Quote Link to comment https://forums.phpfreaks.com/topic/192888-order-by-clause-for-specific-word-order/ Share on other sites More sharing options...
trq Posted February 22, 2010 Share Posted February 22, 2010 You need to define some type of order, that isn't ordered. Quote Link to comment https://forums.phpfreaks.com/topic/192888-order-by-clause-for-specific-word-order/#findComment-1015923 Share on other sites More sharing options...
scarhand Posted February 22, 2010 Author Share Posted February 22, 2010 got it order by field(fruit_name, 'apple', 'orange', 'grape') Quote Link to comment https://forums.phpfreaks.com/topic/192888-order-by-clause-for-specific-word-order/#findComment-1015927 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.