CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 CCGetDBValue?

Print topic Send  topic

Author Message
a
Posted: 06/06/2002, 2:02 PM

Anyone know how to use the second argument in the PHP Function CCGetDBValue?

CCGetDBValue($sql,$db)

The functions reference states to use the connection class for data retrieval.

Anyone have an example of this?
DaveRexel
Posted: 06/06/2002, 2:22 PM

a (last name b?),

This is an extract of what YS sent me :

----------------

Dave,
please use following code in events to look up table value:
1.
global $<form_name>;
$new_obj = new clsDB<connection_name>();
$sql = "select category_desc from categories where category_id=". CCToSQL($<form_name>->item_id->Value, "Number");
$myLookup = CCGetDBValue($sql, $new_obj);
$<form_name>-><field_name>->SetValue($myLookup);

OR
2.
global $<form_name>;
$new_obj = new clsDB<connection_name>();
$res = CCDLookUp("lookup_field_name", "table_name", "id=".CCToSQL($<form_name>->item_id->Value, "Number"), $new_obj);
$<form_name>-><field_name>->SetValue();

Regards,
Helen
-----------------

Greetings,
Dave
a b
Posted: 06/06/2002, 2:29 PM

Hey . Thanks. Your the man.


Pretty close to what I had already.

Sincerely,
a b

   


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.