Sorting Database columns using codeigniter |
[eluser]jason97673[/eluser]
So I am new to useing codeigniter and there isnt as much documentation on this as there is just plain PHP without a framework. Well I am making a simple site (for now) that has many fields and is grabbing the records from a database. I want to be able to click on the column headers and sort them. I want to beable to have them be clicked and have it sorted DESC or ASC. Using regular PHP I can do this but not using the codeigniter framework. Ill show you the site. http://sykotic-designz.org When you visit the site it is a simple table with many fields and for now only 2 records. I want to beable to click name and have it sort from A-Z(then if possible have it sort the opposite direction if clicked again). Or if you click CMP, ATT, CMP % etc, have those sorted from higher to lower(then the opposite direction if possible when clicked again). My code right now in the view is Code: <table border="1"> The code in the controller is Code: class FirstDown extends Controller { Thanks for any help. |
Messages In This Thread |
Sorting Database columns using codeigniter - by El Forum - 04-26-2009, 12:05 PM
Sorting Database columns using codeigniter - by El Forum - 04-26-2009, 12:12 PM
Sorting Database columns using codeigniter - by El Forum - 04-26-2009, 12:24 PM
Sorting Database columns using codeigniter - by El Forum - 04-26-2009, 12:26 PM
Sorting Database columns using codeigniter - by El Forum - 04-26-2009, 12:32 PM
Sorting Database columns using codeigniter - by El Forum - 04-26-2009, 12:35 PM
Sorting Database columns using codeigniter - by El Forum - 04-26-2009, 08:39 PM
Sorting Database columns using codeigniter - by El Forum - 04-26-2009, 09:49 PM
Sorting Database columns using codeigniter - by El Forum - 04-30-2009, 06:29 PM
Sorting Database columns using codeigniter - by El Forum - 04-30-2009, 07:43 PM
|