CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 PHP code error in Tutorial 1 page 190

Print topic Send  topic

Author Message
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>;


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.