Kip Dole
|
Posted: 09/22/2003, 10:57 AM |
|
Hi,
I am new to Codecharge Studio and would appreciate any help. I would like to only show records for the following.
Select * from members where Session("UserLogin") = members.login
and was wondering how I would set this up.
Thanks
|
|
|
Bruce Van Horn
|
Posted: 09/22/2003, 12:06 PM |
|
You'll want to use the built in function CCSGetUserID(). This grabs the session variable containing the current users id.
Create your query in the query editor like so:
Select * from members
Then add the parameter. You'll see a drop down that will let you select fields from your database. Select UserLogin. The next drop down is a qualifier. Set it to equals. The next box over (going left to right) is automatically populated with UserLogin. Change this to CCSGetUserID(). Right below where you typed this is another selector which probably reads "URL". Change it to Expression.
This is probably one of the hardest things to get used to if you're used to hand coding. Don't try to put everything in the SQL. Put just the sql you need to do the job and set the rest as parameters. CCS will create the object and methods for you, and its generally more robust than hard coding sql on the fly (and if you're like me, less prone to typos).
|
|
|
R Osorio
|
Posted: 09/22/2003, 12:09 PM |
|
Try
"Select * from members where member.login =" & Session("UserLogin")
|
|
|
|