Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Ayeidea
Starting Member
17 Posts |
Posted - 2001-11-27 : 14:49:57
|
| Ok question. What would the best way for me to list two fields like this.---------------------------------------| Cat A | Cat B || link a1 | link b1 || link a2 | link b2.. || Cat C | Cat D || link c1 | link d1 |and so on and so on. the two boxes are cells in a row in a table.the table that the links and cat are pulled fromlook like thisLink Cata1 aa2 ab1 bb2 b and so on. how do i go from cell to cell and list the cats in alpha order and then list each link that goes with the cat directly under that?-----note---I think i can do this will a GetRows(,,Array("Cat", "Ltitle","LID","trackerlink"))and i have figured out how i can list the getrows using Mod 2but i still cant figure out how i can list 1 Cat and multiple Ltitle's under each Cat?Edited by - AyeIdea on 11/27/2001 16:00:55 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2001-11-28 : 16:37:29
|
Return your recordset sorted by Category and then by Link. Then, in your ASP code, do standard Break Logic. In other words, loop through your array, and on each loop do something like If LastCat = ThisCat Then 'Put link in this cellElse 'Close Cell, open next cell, put link in thereEndLastCat = ThisCat -------------------It's a SQL thing... |
 |
|
|
|
|
|
|
|