Jean-Michel Giorgi
|
| Posted: 06/09/2002, 7:13 AM |
|
Tutorial 1's PHP code at page 190 does not work:
1/ For an unknown reason the use of the connection object as global does not work, you must declare a new object
2/ There is a bug in line 5, the correct name of the label is user_id_assign_by and not assigned_by
The correct (working) code is:
global $tasks;
$db = new clsDB<Your connection name>();
if($tasks->EditMode)
$tasks->user_id_assign_by->SetValue(CCDLookUp("emp_name","employees","emp_id=" .
$db->ToSQL($tasks->user_id_assign_by->GetValue(),ccsInteger),$db));
else
$tasks->user_id_assign_by->SetValue(CCDLookUp("emp_name","employees","emp_id=" .
$db->ToSQL(CCGetUserID(),ccsInteger),$db));
I post this thread because of the time it took me to understand. Hope it can help.
|
|
|
 |
Nicole
|
| Posted: 06/10/2002, 7:00 AM |
|
Hello,
the code in tutorial works fine with CCS1.0. Do you use final release?
The code should be:
global $tasks
global $DBIntranetDB;
where "IntranetDB" is connection name. In common:
global $<form_name>
global $DB<connection_name>;
|
|
|
 |
|