CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 CCDLookup problem

Print topic Send  topic

Author Message
Waspman

Posts: 948
Posted: 11/05/2013, 3:56 AM

Been a while since I did anything with CCS.

So a bit rusty:)

...anyone now why this doesn't work...

global $db0;
$db0 = new clsDBConnection1();
$Container->Label1->SetValue(CCDLookUp("password","accounts","accountID=14", $db0));
$db0->close();
_________________
http://www.waspmedia.co.uk
View profile  Send private message
jekes

Posts: 36
Posted: 11/05/2013, 3:27 AM

Try this

 $Container->Label1->SetValue(CCDLookUp("password","accounts","accountID='14'", $db0));


or

 $Container->Label1->SetValue(CCDLookUp("password","accounts","accountID=".$db0->ToSQL(14,ccsInteger), $db0));
View profile  Send private message
Waspman

Posts: 948
Posted: 11/05/2013, 8:38 AM

This is what fixed...

global $db1;
global $SQL1;
global $C;
global $PW;
$db1 = new clsDBConnection1();
$C = CCDLookup("COUNT(*)","accounts","email=".CCToSQL($Container->email->GetValue(),ccsText), $db1);
if ($C<>1){
$SQL1 = "INSERT INTO accounts (fullname,phone,postcode,email,password,signupdate) VALUES (". $db1->ToSQL($Container->name->GetValue(),ccsText) .",".$db1->ToSQL($Container->phone->GetValue(),ccsText) .",".$db1->ToSQL($Container->postcode->GetValue(),ccsText) .",".$db1->ToSQL($Container->email->GetValue(),ccsText) .",".$db1->ToSQL(CCGetSession("pword"),ccsText) .",Now())";
$db1->query($SQL1);
}else{
$PW = CCDLookUp("password","accounts","email=".CCToSQL($Container->email->GetValue(),ccsText), $db1);
CCSetSession("pword",$PW);
}
$db1->close();


CCToSQL or ToSQL - You decide:)
_________________
http://www.waspmedia.co.uk
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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