C
|
cgphp 8/26/2011 |
I suppose that in the "records" table there will be a field indicating the record owner (username_field) so, in the "Before SQL query" event of the List page, set the where clause for the current logged in user: $strWhereClause = "username_field='".$_SESSION['UserID']."'"; |
T
|
techster author 8/26/2011 |
I suppose that in the "records" table there will be a field indicating the record owner (username_field) so, in the "Before SQL query" event of the List page, set the where clause for the current logged in user: $strWhereClause = "username_field='".$_SESSION['UserID']."'";
|
C
|
cgphp 8/26/2011 |
I think it would be better to have a support table for the assignments. Anyway, if you add two new fields, the before SQL query becomes:
|
T
|
techster author 8/26/2011 |
I think it would be better to have a support table for the assignments. Anyway, if you add two new fields, the before SQL query becomes:
|
T
|
techster author 8/26/2011 |
Thanks again Cristian. What do we mean by support table? A new table with name, assignment id?
|
C
|
cgphp 8/26/2011 |
Yes, a table where you keep the record_id and the assignment_id. |
C
|
cgphp 8/26/2011 |
Can ownersfield be filled automatically with the user who logs in?
|
T
|
techster author 8/26/2011 |
Before record added ?
|
C
|
cgphp 8/26/2011 |
Yes, because onwer and user will be same at any given point in time...
$values['owner_field_name'] = $_SESSION['UserID']; |