kramerkeller Posted January 18, 2007 Share Posted January 18, 2007 I have thought of several ways to do this, but wanted to get opinions on best practices and the most effecient methods.If I have a table of stuff with headers and I would like to reorder by heading, what is the best way to do this? For example I have multiple views we will say view a,b,c,d and in those views you can order list by, date, name, etc.Would I want to create session variables for how to order the list and repull from the mysql database each time, or do I want to pull an array once and reorder itHope I am making some sense - any opinions would be great Link to comment https://forums.phpfreaks.com/topic/34757-php-and-ordering-tables-newbie/ Share on other sites More sharing options...
owenjh Posted January 18, 2007 Share Posted January 18, 2007 What I would do is create a get or post variable and set up actions for the sort method. A page refresh would need to happen but it will be easier then trying to reorder the arrays in javascript. Link to comment https://forums.phpfreaks.com/topic/34757-php-and-ordering-tables-newbie/#findComment-163825 Share on other sites More sharing options...
kramerkeller Posted January 18, 2007 Author Share Posted January 18, 2007 With each action would I repull from the MySQL database, or should I store an array? I don't know if it is a big deal to pull from the database over and over (I could index too) or if it is a bigger deal to have a stored array lingering around. Link to comment https://forums.phpfreaks.com/topic/34757-php-and-ordering-tables-newbie/#findComment-163832 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.