Welcome Guest, Not a member yet? Register   Sign In
Mysql Stored Procedure multiple select
#1

(This post was last modified: 06-12-2018, 01:46 PM by craja26.)

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
Reply
#2

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.
Reply
#3

(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
Reply
#4

@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.
Reply
#5

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




Theme © iAndrew 2016 - Forum software by © MyBB