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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOING A FILTER LOOP?? Is it Possible????

Status
Not open for further replies.

8696

Technical User
Aug 16, 2001
1
US
My problem is listed here, I fixed problem #1 now I only need to get over #2. Please see link to test page to understand what I am talking about:


As you can see if you click on an artists it takes you to a detail page, yet in the detail page it only gives me one news (top left) for the artist being clicked on, I want it to show me all the news for the artist not just one.... I tried doing a repeat region, but it doesnt filter the results by artist and gives me news on all artists. any Idea how I might do this?


Thanks,

Javier::)
 
You need to work with a loop:
first you select all the records that match the artist
dim ssql
ssql = "select * from artist_news where ID_artist = " & request.fields("artist")

then build up the recordset
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data source=" & Server.MapPath\artists.mdb")
set rs = conn.execute(ssql)



do While not rs.eof
.... (the code with witch you want to display a news item
rs.movenext
loop

But i need more details on the database fields to adapt it... i guess this is a step in the right direction
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top