Jump to content

PHP and ordering tables - newbie


kramerkeller

Recommended Posts

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 it

Hope 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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.