n000bie Posted January 18, 2010 Share Posted January 18, 2010 This is getting more and more confusing and I don't even have an idea how to start. e.g. I have a dynamic menu A B C D what I have to do is sort those menus by clicking up or down arrows (in backend) so the menus can be re-ordered. Can anyone point me to a tutorial or an example ? Link to comment https://forums.phpfreaks.com/topic/188847-how-to-sort-field-from-php/ Share on other sites More sharing options...
pneudralics Posted January 18, 2010 Share Posted January 18, 2010 You can do something like: "SELECT * FROM table ORDER BY field DESC" or ASC depending if you want ascending or descending Link to comment https://forums.phpfreaks.com/topic/188847-how-to-sort-field-from-php/#findComment-996997 Share on other sites More sharing options...
Buddski Posted January 18, 2010 Share Posted January 18, 2010 No your in the wrong forum, to do what you want to do is with JavaScript, NOT PHP Link to comment https://forums.phpfreaks.com/topic/188847-how-to-sort-field-from-php/#findComment-996999 Share on other sites More sharing options...
n000bie Posted January 18, 2010 Author Share Posted January 18, 2010 I want to move the fields up and down by clicking on the button and they have to saved in db, can you tell me the keyword what it is called so i can search in google. Link to comment https://forums.phpfreaks.com/topic/188847-how-to-sort-field-from-php/#findComment-997002 Share on other sites More sharing options...
Buddski Posted January 18, 2010 Share Posted January 18, 2010 You already know what you want to do.. You should google that... All PHP is going to do is output the initial order you need javascript to change it around dynamically.. In any case here.. http://stackoverflow.com/questions/518382/reordering-of-table-rows-with-arrow-images-for-up-and-down Link to comment https://forums.phpfreaks.com/topic/188847-how-to-sort-field-from-php/#findComment-997007 Share on other sites More sharing options...
n000bie Posted January 18, 2010 Author Share Posted January 18, 2010 ok thanks i will check it out Link to comment https://forums.phpfreaks.com/topic/188847-how-to-sort-field-from-php/#findComment-997025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.