|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Roles
Quick question on Roles...I have them working for me, I worked through an example in my book...but...
In the query they used, they did this... <CFQUERY Name="getuser" Datasource="whatever"> Select ID, fname, userrole From contacts LEFT OUTER JOIN USERROLES ON contact.UserRoleID = UserRoles.UserRoleID Where UserLogin = '#Form.userlogin#' AND UserPassword = '#Form.userpassword#' </CFQUERY> I don't understand these two lines... From contacts LEFT OUTER JOIN USERROLES ON contact.UserRoleID = UserRoles.UserRoleID The from contacts is obvious, and a Left outer join is an SQL thing, but I don't understand what it's there for. I was getting an error saying "userroles object invalid" so I removed thoes two lines and it works properly. And when I use <CFIF IsUserInRole("Admin") whatever </CFIF> it works properly, ie. if i'm not an admin it won't show that code. If somebody could explain it, that would be awesome Thanks Caden |
|
#2
|
|||
|
|||
|
You're asking about two totally different things. The INNER JOIN in the SQL statement is used to relate two tables together. More information can be found here.
The isUserInRoles() function is a CFML function used with the <cflogin> tag. It doesn't have anything to do with SQL, it deals with checking for security permissions.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Roles |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|