Tor
|
Posted: 09/30/2003, 6:06 AM |
|
Hi.
I'm just started using Codecharge.
I want to go directly from a loginform to a recordform (edit)
The ID of the user is the ID of the record.
I can manage to open the recordform when I login, but the record is empty.
The user is supposed to be able to edit his own record, and no other
records.
Please help me get started!
Best Regards
Tor, Denmark
|
|
|
arrowgance
|
Posted: 09/30/2003, 9:42 PM |
|
I dunno if you are referring to CC or CCS but in any case you need the ID for the record.
let's say gotorecord.asp?id=4
that means you get the data for id=4
If you mean user can only edit his records then you have to analyze or reconstruct your dataschema.
Let's say the userstable need to edit their tasks
tableusers(userid,username)
userid-----------username
1----------------frank
2----------------ryan
3----------------jim
tabletasks(taskid,userid,task)
taskid--------userid------------task
1--------------2----------------feed the dog
2--------------3----------------buy motor oil
3--------------3----------------mow the lawn
Then your datasource SQL to get jim's tasks would be
SELECT * FROM tabletasks WHERE (userid=3)
Now you do not need 3 to be hardcoded right then pass it into a URL parameter instead like
SELECT * FROM tabletasks WHERE (userid={userid})
Assuming of course {userid} is your proper querystring name.
The rest is up to you. :)
|
|
|
LW Irving
|
Posted: 10/07/2003, 12:24 AM |
|
You need to edit the datasource property
add a "where" parameter that says
userid = userid
then click on parameter type and choose session
HTH
LW Irving
|
|
|
|