calling a mySQL Procedure

calling a mySQL Procedure

Postby cipo » Tue Mar 09, 2010 4:25 pm

How can I execute a mySQL Procedure that has Input and Output Parameters and is called, when a button is pressed ?
cipo
 
Posts: 1
Joined: Fri Feb 26, 2010 1:02 am

Re: calling a mySQL Procedure

Postby steven » Wed Mar 10, 2010 8:07 am

cipo,

Unless I know what you are trying to do eg. what you want to do with the output parameter, I'll probably give you the wrong answer.

But the general pattern of a nuBuilder form is to edit a record. And at the point of saving those changes (as its being posted)

you can reference the values that you have put in the fields of that form (your input parameters) via hash variables..

eg. a field name of customer_id could be used as

$string = "SELECT * FROM customer WHERE customer_id = ''#customer_id#";



This would be in the Before Save or After Save sections of the form.

(http://wiki.nubuilder.com/tiki-index.php?page=Forms%3A%20Edit%20Code&structure=nuBuilderDocs).

Again, you'll probably need to give me a more specific version of what you want to do..

Steven
steven
 
Posts: 91
Joined: Mon Jun 15, 2009 5:33 pm

Re: calling a mySQL Procedure

Postby steven » Wed Mar 10, 2010 9:07 am

cipo,

It seems that you can't use a procedure simply by using nuRunQuery but the mysql forum may have a solution.

http://forums.mysql.com/read.php?52,11091,112785#msg-112785

Steven
steven
 
Posts: 91
Joined: Mon Jun 15, 2009 5:33 pm


Return to Custom Code



cron