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

 Multi Step registration Error

Print topic Send  topic

Author Message
vartron


Posts: 7
Posted: 08/13/2014, 9:26 PM

I recreated the exercise practiced (Multi Step registration) by 100% in the project examplepack1, but when I try to do the same in my database MySQL in other project, it gives me the following error:

Call to a member function ToSQL() on a non-object in C:\AppServ\www\patrimonio\NewPage1_events.php on line 112
The line 112 is: $LastID = CCDLookup("max(id_usuario)","usuarios","d_nick=".$DBInternetDB->ToSQL(CCGetFromPost("d_nick",""),ccsText),$DBInternetDB);
-----------------------------------------
This is my code in the after Insert event, is the same but changing the "user_id" for "id_usuario " and changing the tables "user" for "usuarios"

global $DBInternetDB;
global $Redirect;

//Retrieve the last inserted key if a new user is registered
//This method of retrieving the last inserted key is safe because the value of the user_login field has to be unique.
if(!CCGetFromGet("id_usuario",0)) {
$LastID = CCDLookup("max(id_usuario)","usuarios","d_nick=".$DBInternetDB->ToSQL(CCGetFromPost("d_nick",""),ccsText),$DBInternetDB);
if (strpos($Redirect,"?") == false ) {
$Redirect = $Redirect."?id_usuario=".$LastID;
} else if (substr($Redirect,-1) == "?" ) {
$Redirect = $Redirect."id_usuario=".$LastID;
} else {
$Redirect = $Redirect."&id_usuario=".$LastID;
}
}

the user is registered into the database MySQL, but can not continue with the next step by the error

Wtha is the problem, thanks for your time.
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.

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.