Get return data from a MySQL Stored Procedure |
10/5/2025 09:19:35 | |
PHPRunner General questions | ||
A
asawyer13 authorDevClub member
I've tried quite a few things from suggestions in the manual and in the forum but can't get this to work. I have a MySQL stored procedure that I can calling from a PHPRunner event (Before Processing). That stored procedure needs to return 1 row of data that contains 2 columns of data. Since it's only one row, I'm fine with any method that will work. so I am calling the SP like this. I can use out parameters if needed. Call MyStoredProcedure(1,2,3); I want to get back 2 values like value 1 = 'Ok' Any help would be appreciated. |
||
![]() |
ChatGPT 10/5/2025 |
Certainly! To call a MySQL stored procedure from PHPRunner and retrieve the values, you can use either output parameters or a result set. Here’s how you can do it using both methods. Using Output ParametersIf you want to use output parameters, you will need to modify your stored procedure to accept parameters for output. Here’s a basic example of how your stored procedure might look:
|
|
![]() |
Sergey Kornilov admin 10/6/2025 |
If your stored procedure returns a recordset, you can simply use Database API to execute a stored procedure call and return data: |
|