CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 CCDLookup Help Needed - Newbie!!

Print topic Send  topic

Author Message
guerre64
Posted: 01/31/2005, 3:56 AM

Hi there.
I'm trying to do something fairly simple in retrieving a text value that matches a numeric identifier in the same table of a database, using the CCDLookup function.

My current code is as follows:

global $DBpepperbox;
global $product2;
$result = CCDLookUp("composername", "composer", "composerid", $DBpepperbox);
$result = strval($result);
$product2->composerid->SetValue($result);

My problem is that I can't quite figure out the syntax/wording of the WHERE criteria. My table - composer - has "composername" and "composerid" and I want to be able to display the composername text value in my resulting page rather than the composerid numeric value.

Any assistance appreciated.

Cheers.
Guerre.
mamboBROWN


Posts: 1713
Posted: 01/31/2005, 6:08 AM

What is the name of the field with the actual composerid? Let's call it composerid for this example. You should have two fields for this to work properly. You should have an hidden field (composerid) and a visible field (like Label1).

What is the name of the data grid? Let's call it NewGrid1.

What is the name of the field that will display the composername in text? Let's call it Label1.

This is how the statement should read:
$result=CCDLookUp("composername","composer","composerid=".$NewGrid1->composerid->GetValue(),$DBpepperbox)

Here is the link to the codecharge userguide (as a guide):
http://docs.codecharge.com/studio/html/QuickStart/Creat...ntPage.html?toc

Hopefully this will be helpful.
View profile  Send private message
guerre64
Posted: 01/31/2005, 2:27 PM

Cheers mamboBROWN - that was exactly what I was looking for - couldn't quite figure it out as I'm pretty new to php - your solution helped me brilliantly.

Thanks again.

Add new topic Subscribe to topic   


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.