Skip to main content
Participating Frequently
February 12, 2007
Answered

Dynamically Sort in a table

  • February 12, 2007
  • 5 replies
  • 404 views
Using DW MX2004 and MSAccess. I have a table that pulls information from my database - it has column headers. I would like to make the headers (when selected) sort the table. Example: My table has Model and Manufacturer along with other things like item description etc. I want the user to be able to click the 'Model' header and the table will reindex based on Model. Same with Manufacturer etc. What is the easiest way to accomplish this?
This topic has been closed for replies.
Correct answer
Sorry I have done it again, I keep forgetting to read the post as well.

Try these:
http://www.webthang.co.uk/tuts/tuts_dmx/dynasort/sort1/films.asp?Submit=Z-A&order=genere+desc
This is a tutorial:
http://www.webthang.co.uk/tuts/tuts_dmx/dynasort/dynasort.asp

Cheers
West

5 replies

JeneyAuthor
Participating Frequently
February 14, 2007
February 14, 2007
Hi Jeney

It seems you need someone like Mike to sort out these problems as doing it yourself isn't working.

Cheers
West
Inspiring
February 12, 2007
Jeney wrote:

> Yes Mick - exactly like that - I can't use PHP...

Can you post a URL?
The script is a little complicated, it needs to know the nature of what
it is sorting. I'll show you what to do.
Mick
JeneyAuthor
Participating Frequently
February 12, 2007
Yes Mick - exactly like that - I can't use PHP...
Correct answer
February 12, 2007
Sorry I have done it again, I keep forgetting to read the post as well.

Try these:
http://www.webthang.co.uk/tuts/tuts_dmx/dynasort/sort1/films.asp?Submit=Z-A&order=genere+desc
This is a tutorial:
http://www.webthang.co.uk/tuts/tuts_dmx/dynasort/dynasort.asp

Cheers
West
February 12, 2007
Hey Jeney

Try this have not tested it yet.

$query="select * from table";
if(isset($_GET["orderby"])){
$query.=" order by ".$_GET["orderby"];
}

Cheers
West
Inspiring
February 12, 2007
Jeney wrote:

> Using DW MX2004 and MSAccess. I have a table that pulls information from my
> database - it has column headers. I would like to make the headers (when
> selected) sort the table. Example: My table has Model and Manufacturer along
> with other things like item description etc. I want the user to be able to
> click the 'Model' header and the table will reindex based on Model. Same with
> Manufacturer etc. What is the easiest way to accomplish this?
>
something like this?
http://www.mickweb.com/football/rhinos/2006/profiles2006.php
Mick