Cold Fusion + SQL, Help if you would be so kind

Associate
Joined
12 Mar 2005
Posts
2,021
Location
Scotland
Hey having some trubble getting my website to work. (:( boooo i hear you all say)

Iv got ...session.AccessLevel = CustID... when the cust logs onto the website, which works fine, i can output the session.AccessLevel on any other page after that. :)

What i need is to display cust details where session.AccessLevel = CustID:

SELECT *
FROM Cust
WHERE session.Accesslevel = CustID

error i get:

Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]The multi-part identifier "session.AccessLevel" could not be bound.


I also tried 'session.AccessLevel' = CustID

error:

Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the varchar value 'session.AccessLevel' to data type int.


How can i compair AccessLevel and CustID in the SQL statment? :confused:

Cheers :D
 
Last edited:
Thanks for the sugestion. Managed to work it out...eventualy

needed to be:

CustID = #session.AccessLevel#

Lest thats over with now, im sure ill have lots of questions for you all soon :p

Cheers
 
Back
Top Bottom