Page 1 of 1

calling a mySQL Procedure

Posted: Tue Mar 09, 2010 7:55 am
by cipo
How can I execute a mySQL Procedure that has Input and Output Parameters and is called, when a button is pressed ?

Re: calling a mySQL Procedure

Posted: Tue Mar 09, 2010 11:37 pm
by steven
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.ph ... uilderDocs).

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

Steven

Re: calling a mySQL Procedure

Posted: Wed Mar 10, 2010 12:37 am
by steven
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,110 ... msg-112785

Steven