Question
CFQuery and returning values
I need help querying a database based on the current user
signed in (right now we will put the user in the code itself i.e.
if username = swat4 and this value = whatever) and then return true
if those conditions apply so I can use a cfif to determine what
content to display.
The datasource is SiteAdmin. The Table is WWWAdminTable. And the fields include NTUsername, LASNav, WWWNav, EngNav, BusNav, Control. These fileds are mainly a 0 or 1 value, 1 meaning they have permission to view that navigation page.
Here's the code I have started, but I feel it might be going in the wrong direction. I need to know how I can use what I have to query the database, if a username there exists, and the value of (let's say WWWNav) is 1, then using a cfif statement say something like - cfif query getPermissions = true. Please help and thank you.
<cfquery name = "getPermissions" datasource = "SiteAdmin">
SELECT NTUsername, LASNav, WWWNav, EngNav, Control
FROM WWWAdminTable
WHERE
<cfquery>
The datasource is SiteAdmin. The Table is WWWAdminTable. And the fields include NTUsername, LASNav, WWWNav, EngNav, BusNav, Control. These fileds are mainly a 0 or 1 value, 1 meaning they have permission to view that navigation page.
Here's the code I have started, but I feel it might be going in the wrong direction. I need to know how I can use what I have to query the database, if a username there exists, and the value of (let's say WWWNav) is 1, then using a cfif statement say something like - cfif query getPermissions = true. Please help and thank you.
<cfquery name = "getPermissions" datasource = "SiteAdmin">
SELECT NTUsername, LASNav, WWWNav, EngNav, Control
FROM WWWAdminTable
WHERE
<cfquery>
