CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Does Code Charge Studio 4 support output parameters from Stored Procedures yet?

Print topic Send  topic

Author Message
abbymsmith

Posts: 23
Posted: 01/03/2009, 6:04 AM

Hi,

CCS 4.1.00.027, MYSQL 5.0, PHP 4.4.9

I have a form which uses a stored procedure to do a custom insert.

The stored procedure takes data from the form and inserts into 3 or 4 different tables in the database.

I would like the ID of the last table inserted to in the stored procedure (LAST_INSERT_ID() in MYSQL) to be available to use on the return page for the custom insert form page.

My first thought was to save that ID to an output variable in the stored procedure, but I couldn't make the custom insert work with the output variable specified. Removing the output variable altogether the procedure works.

I read in several posts on the forums that sp output parameters were previously not supported in CCS, but was hoping maybe it was now? Is it possible to return the ID as an output parameter? If so, what is the correct way to do it, and to store that value for use on a subsequent page?

If it is not possible, is it possible to grab the LAST_INSERT_ID in the After_Execute_Insert of that page, save to a session variable and then use that variable on another page?

Thanks,
Abby
View profile  Send private message
datadoit
Posted: 01/03/2009, 6:18 AM

http://us.php.net/mysql_insert_id

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.