CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 need help!

Print topic Send  topic

Author Message
dzul

Posts: 5
Posted: 06/02/2011, 1:43 AM

hello all
i am newbie in php pgramming and new to codecharge..just wanna to know how too used CCDLookup function.
i tried to call a data from database and view it on label like this

$lokasi1 = CCDLookUp("nama_lokasi", "lokasi", "id_lokasi=". $DBmaklumat);

but i got error when publish

Catchable fatal error: Object of class clsDBmaklumat could not be converted to string in C:\xampp\htdocs\maklumat_hardware\respon_aduan_com_events.php on line 24

any one know?? sorry coz my bad english:-D
View profile  Send private message
rho


Posts: 85
Posted: 06/02/2011, 1:52 AM

Hi,

you have a syntax error in your statement: the id-variable is missing.

Try something like:

$lokasi1 = CCDLookUp("nama_lokasi", "lokasi", "id_lokasi=".$idlokasi, $DBmaklumat);

Cheers, Rob.
View profile  Send private message
dzul

Posts: 5
Posted: 06/02/2011, 2:03 AM

thanks for reply rob :-) but wanna to know $idlokasi its stand for what?sorry coz i try to get it..:(
View profile  Send private message
rho


Posts: 85
Posted: 06/02/2011, 2:08 AM

Hi dzul,

$idlokasi is the variable that contains the value of the id_lokasi that you want to select from the table lokasi.

In other words: the CCDLookup() function selects the "nama_lokasi" value from the row in table "lokasi" where the "id_lokasi" field equals the value of the $idlokasi variable.

Rob.
View profile  Send private message
dzul

Posts: 5
Posted: 06/02/2011, 2:46 AM

rob..can u give me a simple example?:-/
View profile  Send private message
datadoit
Posted: 06/02/2011, 5:33 AM

http://docs.codecharge.com/studio40/html/ProgrammingTec...BValue.html?toc
rho


Posts: 85
Posted: 06/02/2011, 11:49 PM

Thanks datadoit. My reply would be along the same lines.
View profile  Send private message
dzul

Posts: 5
Posted: 06/03/2011, 1:56 AM

thanks guys:-)
but one more question..hehehe..how can i set a value to label from database?
like this:
i got a name of user which is a ID (integer) and i want to show the name at label int he next page. now it show as a interger. :-D
View profile  Send private message
rho


Posts: 85
Posted: 06/03/2011, 3:56 AM

The way you formulate your question makes it difficult for me to understand what exactly your problem is. I suggest that you read up on Labels in

http://docs.codecharge.com/studio40/html/index.html?htt.../Label.html?toc

and/or build one of the tutorials, see:

http://docs.codecharge.com/studio40/html/index.html?htt...QuickStart.html

This will give you a quick&easy way to start with and understand to possibilities with Codecharge and application development in general.

With regards to your label: make sure it's DataType is 'Text' and set it's value in it's BeforeShow() event, for example:

$sender->Value = CCDLookup('person_name', 'table_persons', 'person_id='.$person_id, $db);

Good luck, Rob.
View profile  Send private message
datadoit
Posted: 06/03/2011, 5:59 AM

http://docs.codecharge.com/studio40/html/Actions/Server/DLookup.html?toc

No programming required.
dzul

Posts: 5
Posted: 06/06/2011, 5:24 PM

thanks rob and datadoit ;) now solve..hehehe..and understand what rob mean;)
but i got error when publish the project :
The value in field Tarikh Aduan is not valid. Use the following format: dd/mm/yyyy.
what this error mean? i change the property and same error i got:-( :-(
View profile  Send private message

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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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