Solved

Question on List

Posted on 2003-12-04
2
164 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

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…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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