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

cfloop list problem

Status
Not open for further replies.

jarla

Programmer
Jan 2, 2001
34
FI
Hi!
Again stuck with cfloop. Do you have any suggestions to this, I´ve tried almost everything I can... :(
I have a cd-database which have all information about every cd in our cd-shop. There is a datafield "Tracklist". With help of "Valuelist" it´s easy to create nice list from comma-separated list of songs. I´ve used this:
<cfset temp = ValueList(tracklist)>
<cfloop From = "1" TO = "#ListLen(temp)#" INDEX="Counter">
#Counter#.#ListGetAt(temp, Counter)#<br>
</cfloop>
Then I get a list like:
1.Song one
2.Song two
3.Song three
...etc...etc

But how can I handle double cds that I can have a list like:
DISK 1:
1.Song one
2.Song two
DISK 2:
1.Song one
2.Song two

It´s important that I can input also double cd´s tracklist values to the database normally. That´s all for now :) I hope (and I know) that you can help.
 
How is it identified in the database as to what disk the songs are on?
If there isn't a way to distinguish it in the db I don't think you can do it. Maybe a nother field in the db called diskNumber then group by diskNumber.

Code:
<cfoutput query = "qListTracks" group = "diskNumber">
  #qListTracks.diskNumber#<br>
  <cfoutput>
    #qListTracks.currentRow#.#qListTracks.trackList#<br>
  </cfoutput>
</cfoutput>
I think would work for you

thereptilian120x120.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top