Solved

Question on List

Posted on 2003-12-04
2
158 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
ID: 9875379
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
ID: 9875477
cool man.. i got it working with some small change.. thanks for the idea.. i was tearing my hair here.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

912 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

21 Experts available now in Live!

Get 1:1 Help Now