Welcome Guest, Not a member yet? Register   Sign In
Backend Database Ordering
#2

[eluser]Cro_Crx[/eluser]
So you mean a table that when you click on the column headings it sorts the data ascending (for the first click) / descending (for the second click) for that particular row ?

Easiest way would be to pass that info the the URI so for example website.com/information/sort/column/asc then just fetch the uri segments with:

Code:
$column = $this->uri->segment(3);
$order = $this->uri->segment(4);

If you want to be able to sort by more than one row at a time, for example sort by date and then ID second, you could just count the number of URI segments and loop through them accordingly so you would have a uri like: website.com/information/sort/column/desc/another_column/asc/third/desc

Then just count the total segments and use every second column (after the 3rd) for the column name and every other one for the order.


To get the info from DMZ, you can just use their inbuild methods to sort Smile


Messages In This Thread
Backend Database Ordering - by El Forum - 12-01-2009, 11:42 PM
Backend Database Ordering - by El Forum - 12-02-2009, 12:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB