CodeIgniter Forums
Mysql Stored Procedure multiple select - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forum-6.html)
+--- Forum: Issues (https://forum.codeigniter.com/forum-19.html)
+--- Thread: Mysql Stored Procedure multiple select (/thread-70878.html)



Mysql Stored Procedure multiple select - craja26 - 06-12-2018

Hi,

I have mysql stored procedure, which has multiple SELECT statements but I am getting results of first SELECT statement only in Codeigniter. Could you please suggest me how to get the remaining(2nd and 3rd) SELECT statement results when using mysql stored procedure.


Thank you,
Raja


RE: Mysql Stored Procedure multiple select - Lxocram - 06-12-2018

This is not possible. You only get 1 result variable.
Split you stored proc in 3 separate calls and then make 3 calls.

Or combine the 3 resultsets into 1 set.


RE: Mysql Stored Procedure multiple select - craja26 - 06-13-2018

(06-12-2018, 11:49 PM)Lxocram Wrote: This is not possible. You only get 1 result variable.
Split you stored proc in 3 separate calls and then make 3 calls.

Or combine the 3 resultsets into 1 set.

Thank you Lxocram.

Combining 3 result set into a single result set may contain duplicate data.

Splitting Stored procedure into 3 makes increase the code in Model as well as stored procedure.

If codeigniter team release a library or solution for this will help us. 

Thank you,
Raja


RE: Mysql Stored Procedure multiple select - php_rocs - 06-14-2018

@craja26

Don't forget that you can also create a view that has all of the data that you may need. Then you can be specific as to the parameters you want from the view.


RE: Mysql Stored Procedure multiple select - Clockwerx - 07-25-2018

Do you get the right data back when you run the procedure in MySQL?