请教这个是不是要用嵌套?
表1:
列名: id station index
值: 1 aaa 1
值: 1 bbb 2
值: 1 ccc 3
值: 1 ddd 4
值: 2 888 1
值: 2 999 2
值: 2 aaa 3
值: 2 777 4
表2:(id与表1."id"外键)
列名: id startStation endStation startTime endTime
值: 1 aaa ccc 6:00 19:00
值: 2 888 777 6:00 19:00
想实现的效果:通过station的一个值,select id from 表1 where station="aaa",此查询返回两行,一个id=1,另一个id=2. 我想再根据这返回的两行,查询表2中的select * from 表2 where id="第一查询返回的值[i]"和查询表1中的select station from 表1 where id="第一个查询返回的值[i]" order by index desc
若想实现这样的显示,应该如何做?使用datalist或者gridview嵌套,还是动态添加控件个数?有哪位达人指教一下,如果可以的话,请给出具体做法.