Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort a Repeat Region, PHP, how-to?

Status
Not open for further replies.

slakker

MIS
Jun 5, 2003
59
US
Hi all.. I have a table with 3 columns and many rows..
Very top row has the column headings, then I skip a row to give it some space, and then I have the rest of the rows showing data from mysql DB.
I have this setup as a repeat region in DWMX..

I would really like to know if I can sort my whole repeat region by clicking on any one of my 3 column headings..
like.. sort by Name, Title, Email, etc..

This is a commercial extension that someone make, which does just that, and which is a perfect example of what I have.. and want..

I've spent a bunch of money on stupid little things recently and would rather not do it again.. hehe

So, if anyone has any ideas, I would appreciate it.

Thanks in advance!
 
its all in your select statement you need to order by

select *
from table
where price = $variable ORDER BY price

<Signature>
Sometimes the Answer You Are LOOKING for can be FOUND BY SEARCHING THE FAQ'S @&%$*#!!!
</Signature>
 
just use the column headings to post back to the same page with a querystring attached then do your select based on the variable
Code:
example 2 column headings one with a link to mypage.asp?sort=column1 the other to mypage.asp?sort=column2

top of your mypage.asp

strSort = request.querystring(&quot;sort&quot;)

and your select = 

&quot;SELECT * FROM TABLE ...... ORDER BY &quot; + strSort

Cheech

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top