CFSelect multiple=yes broke my grid

I have a CFSelect where I allow the users to select more than 1 item. It inserts the choices into my master table as numbers separated by commas, like this: 35, 45

In order to display the "words" associated with the numbers from the reference table, I do a simple join on the query that the CFGrid Uses.

Does anyone know why the grid fails to load, and won't display the results? Is there a work around so the grid column will show both service types?

Thanks.
earwig75Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gdemariaCommented:

I have a CFSelect where I allow the users to select more than 1 item. It inserts the choices into my master table as numbers separated by commas, like this: 35, 45

Sorry to say, you really need to change this.  This is going to cause you lots of problems beyond the one you're having right now.   You need a child table where each row has two columns; the master table ID and the number.   This is a "normalized" design and will give the power to do everything you need.
earwig75Author Commented:
So you're suggesting a 3rd table that store the selections? How would I display them in the grid?
gdemariaCommented:
My guess is that the simple join you refer to is not returning the values that you expect.    

I don't know any of your column or table names, so hope this makes send ...

select ...
 from masterTable m
  left join referenceTable T on t.ref_id = m.listOfIDs

if  "listOfIds" is your column that contains  35,45
and ref_id is the ID 1,2,3,...35...45, etc...

Then the join
 left join referenceTable T on t.ref_id = m.listOfIDs

would be like saying...
 left join referenceTable T on (35) = (35,45)

that equal will never be a match and therefore not return anything because 35 does not equal 35,45

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.