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

 [Unresolved - After Insert run an Update script (2011)]

Print topic Send  topic

Author Message
CodeChargeMVP

Posts: 473
Posted: 05/12/2011, 1:42 AM

Hi,

I´m still finishing some small tasks on the screen with two record forms which record on the same table.

when the user record the fields from the second form, there´s one field on the first form than has to be recorded also in the database, I´ve found this useful thread:

http://forums.codecharge.com/posts.php?post_id=107300

http://ccselite.com/forums_topics_view.php?forum_id=2&forum_topic_id=84

As it explained, my idea is to run on the after insert event an php script which will update the database.


_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 05/12/2011, 3:16 AM

Here comes the solution:

global $DesemId;
$DesemId = mysql_insert_id();
//End Declare Variable

//Custom Code @155-2A29BDB7

$Consulta = "UPDATE Desembolsos SET DesGesRes=1 WHERE DesemId="."'".$DesemId."'". " AND InterId="."'".$desembolsos2->InterId->Value."'";

DbaUpdate("localhost","dgpolde","dgpolde","dgpolde1",$Consulta);

_________________
Best Regards
Entrepeneur | NT Consultant
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.

Web Database

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.