Solved

Question on List

Posted on 2003-12-04
2
157 Views
Last Modified: 2013-12-24
hello experts:

here is my situation, i have a 2 tables: users and access

access has following columns:
acl_id
acl_org

The data entry of the above table might look something like

1   Firstorg
2   Secorg
3   thirorg

users tables has following columns:
user_id
user_name
user_pass
ACL_ID_list (Out here i have the many ids from the above table, something like 1,2,3)

this table looks like

1  jdoe  ****   1,2
2  john ****   2
3   someone *****  1,2,3

So this tables has information about what orgs the user can access.

when the user logs in i get the ACL_ID_List from session variable. All i want to do is to read that string value and display the corrs Organization data from the first table. I was wondering if a list could be used for this. I may be completely wrong. Please guide.

0
Comment
Question by:adonis1976
2 Comments
 
LVL 9

Accepted Solution

by:
shooksm earned 500 total points
Comment Utility
It sure can.  Here is how you might do it:

<cfquery name="OrgList">
      SELECT *
            FROM access
            WHERE ACL_ID IN <cfqueryparam list="yes" separator="," value="#SESSION.ACL_ID_LIST#">
</cfquery>
0
 
LVL 11

Author Comment

by:adonis1976
Comment Utility
cool man.. i got it working with some small change.. thanks for the idea.. i was tearing my hair here.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now