Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


desperately need help on simple coldfusion/dreamweaver proj.

  • Please log in to reply
1 reply to this topic

#1 wagner12


  • Members
  • 10 posts
  • Local time:06:09 AM

Posted 28 September 2005 - 07:58 PM

Alright here we go....This project for class is due tomorrow and i'm totally stumped so any help would be greatly appreciated!!

The following information should be in the 2 column 7 row form a table i'm not sure how to insert tables in here so this will have to do...ok i have this information and the area codes obviously correspond the the states across from them and i need to take this information and......

Area Code State
319, 515, 712 Iowa
218, 320, 507 Minnesota
414, 608, 715, 920 Wisconsin
308, 402 Nebraska
314, 417, 636, 660, 81 Missouri
Other Other

Put it in the form of a 2 column 7 row table so that it accepts a list of area codes as a URL paremeter named acList and computes and displays how many in the list belong to each state.
My professor said a LIST LOOP with a SWITCH STATEMENT and the a COUNT FUNCTION is need for it to work properly.... here is an example of what one should look like.....

example... stateStats.cfm?acList=319,515,218,218,320,314,417,417,636

State Number
Iowa 2
Minnesota 3
Wisconsin 0
Nebraska 0
Missouri 4
Other 0

If anyone could help me out they would be a LIFESAVER!!!

Thank you,

BC AdBot (Login to Remove)


#2 Christopher83


  • Members
  • 16 posts
  • Local time:07:09 AM

Posted 10 May 2006 - 08:19 AM

It's been a while since this was posted, and who knows if you're around any more, but I thought I'd reply for others, or just to throw out there that there is a CF guy lurking. Since you didn't note a version, I'll assume CFMX 7.

I'm not sure why you'll need a CFLOOP or CFSWITCH, since SQL should handle this just fine. Assuming that the AreaCode field is numeric, you'd just do something like:

select state, count(*) as ACsInList
from area_code_table
where AreaCode in (#url.acList#)
group by state

Then you just CFOUTPUT over there results to display them how you'd like.

Good Luck,

Edited by Christopher83, 10 May 2006 - 08:20 AM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users