Forums
This topic is locked
order by..!
Posted 21 Jul 2002 10:48:15
1
has voted
21 Jul 2002 10:48:15 waleed hussien posted:
how can i change the order of data displayed in a table when i click a link in the same page , if anyone know download.com , you can change the order of viewing sharewares by user ratings or number of downloads..etc by clicking a link on the top of the table.any ideas?
Replies
Replied 21 Jul 2002 11:13:59
21 Jul 2002 11:13:59 Owen Eastwick replied:
Set up your recordset somethong like:
varSort = Request.QueryString("Sort"
If varSort = "" Then
varSort = "RecordID ASC"
End If
RecordsetName.Source = "SELECT Whatever, WhateverElse FROM TableName ORDER BY " & varSort
Then create some links on the page:
<a href="ThisPage.asp?Sort=ThisDatabaseField ASC">Sort by this Field</a>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
varSort = Request.QueryString("Sort"
If varSort = "" Then
varSort = "RecordID ASC"
End If
RecordsetName.Source = "SELECT Whatever, WhateverElse FROM TableName ORDER BY " & varSort
Then create some links on the page:
<a href="ThisPage.asp?Sort=ThisDatabaseField ASC">Sort by this Field</a>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo