Paulo Fagiani
|
| Posted: 08/26/2002, 8:47 AM |
|
Hi folks,
I was just reading the tutorial and I found that the PHP section have something missing and some misspelling too...
I tried to port the ASP code to PHP... it works in half way... because it is considering EditMode = true even in the insert form... so the "else" never runs... any light? am I missing something important? Here follows the code:
function tasks_user_id_assign_by_BeforeShow() { //tasks_user_id_assign_by_BeforeShow @13-B49E3110
//Custom Code @20-2A29BDB7
// -------------------------
global $tasks;
global $DBIntranetDB;
if( $tasks.EditMode )
{
$tasks->user_id_assign_by->SetValue(CCDLookUp("emp_name", "employees", " emp_id="
. $DBIntranetDB->ToSQL($tasks->user_id_assign_by->GetValue(), ccsInteger), $DBIntranetDB));
}
else
{
$tasks->user_id_assign_by->SetValue(CCDLookUp("emp_name", "employees", " emp_id="
. $DBIntranetDB->ToSQL(CCGetUserID(), ccsInteger), $DBIntranetDB));
}
// -------------------------
//End Custom Code
} //Close tasks_user_id_assign_by_BeforeShow @13-FCB6E20C
|
|
|
 |
Ghostman
|
| Posted: 08/26/2002, 2:09 PM |
|
I'm having the same problem, please help!
|
|
|
 |
Rick
|
| Posted: 08/28/2002, 1:12 AM |
|
Guys,
re-download the tutorial. Looks like you're using outdating version. The one I've downloaded yesterday is free of misspell. The code on page 190 should be:
global $tasks;
global $DBIntranetDB;
if( $tasks->EditMode )
{
...
and it works!
|
|
|
 |
|