Hi, at the minute when i add a user to the database they can view all companies
on a list box. Im trying to reduce this so they will only have access to what i
enter in a table called USERSvCOMPANYACCESS, which has the Users Key and the
Company Number in it. Im using the below code, but its
It is going to list them all based on your code:
1. Your query is returning ALL records
2. your displaying all OPTIONs in the SELECT dropdown but ONLY selecting the
ones that was populated in the FORM.COMPANY_NUMBER field.
If you only want the SELECT dropdown to return the one in
Ive tried your code, but all its giving me now is a blank list box, with
nothing to choose in it
It is going to list them all based on your code:
1. Your query is returning ALL records
2. your displaying all OPTIONs in the SELECT dropdown but ONLY selecting the
ones that was populated in the
You need to filter your data for the User Key that is accessing the code.
You can either put a WHERE clause in your SQL Statement or you can put a
conditional statement around the options looking at the USERS_Key.
Query:
The cfqueryparam is made up and you should use your information to set
That works great Chuck, but is there any way i can change the #myUsersKey#
which in my case I just replaced it with 25. if other users log on this will
still hold 25, so id need it to change for every user, if that is possible
You need to filter your data for the User Key that is accessing the
If your user logs in, then when you do the login authenication you can hold
their userid in Session. Then use the Session variable in place of the 25,
#Session.YourUserVariable#.
~|
Want to reach the ColdFusion community with
I dont quite get that
For the user to be able to access this page I add their Windows User Profile to
a table and from there they can access all the companies
If that makes sence
If your user logs in, then when you do the login authenication you can hold
their userid in Session. Then use the
We a user comes to the site, how do you know who they are? If you run a
query against your database you can store the data in Session and use it in
your query to get the companies they have access to.
~|
Want to reach the
8 matches
Mail list logo