Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Can someone help me with some Coldfusion?

Author
Message
itsallgood
22
Years of Service
User Offline
Joined: 17th Sep 2002
Location:
Posted: 2nd Apr 2004 14:16
Hi all, I need some code that will brake up and display a list i've saved as one long string comma separated.

So right now, all i have is <cfset LIST = "A,B,C,D,E,F">



Any way to do this would be great, thanks very much.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 2nd Apr 2004 15:57
My job is a coldfusion programmer!

Couple of different ways:



Boo!
itsallgood
22
Years of Service
User Offline
Joined: 17th Sep 2002
Location:
Posted: 2nd Apr 2004 16:45 Edited at: 2nd Apr 2004 16:50
Thanks spooky, thats just what i was trying to do.

But, now i need to read the List values and display text looked up from a database?


So basicly, when the loop gets to 'A', it looks in the database what 'A' is equal to.

The database is as follows:

Table: tblLookup
Field 1: 'Codes'
A
B
C
D
Field 2: 'Name'
Ant
Bird
Cat
Dog

The code i have so far is:





Do you know how to do this?
Thanks.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 2nd Apr 2004 17:55


To read stuff out of a database, remember you need to set up a DataSource (ODBC or SQL) from within windows control panel or the Coldfusion Administrator. Change the value on the CFQUERY tag to match the name.



Boo!
itsallgood
22
Years of Service
User Offline
Joined: 17th Sep 2002
Location:
Posted: 2nd Apr 2004 18:24
spooky you are a GOD!

you've saved my life man, cheers.

Login to post a reply

Server time is: 2024-09-21 15:32:00
Your offset time is: 2024-09-21 15:32:00