jwh_1997
|
| Posted: 08/23/2002, 9:02 AM |
|
Using JSP
Trying to sort records displayed by user_id, based on the user who is currently logged in. Is there an easy way? I know how to get the user id via the session but using the "WHERE" box in form properties and writing: contact_creator_userid = (String)session.getAttribute("UserID"); will only produce errors. So how do you use dynamic variables in SQL using CC?
Perhaps I am missing something and it is easier than I am making it.
|
|
|
 |
jwh_1997
|
| Posted: 08/23/2002, 9:36 AM |
|
I have found out how to escape the quotes so that the code doesnt error out. Unfortunate that the function doesn't instantiate when or before the SQL calls the Database. here is my code:
contact_creator_id = (String)session.getAttribute(\"UserID\");
This comes up with nothing...even tho the contact_creator_id does equal the UserID.
Any advice?
|
|
|
 |
jwh_1997
|
| Posted: 08/23/2002, 9:48 AM |
|
WHERE contact_creator_id ="+ (String)session.getAttribute("UserID")+
|
|
|
 |
|