How to execute Multiple result sets in CI ? |
I have a stored procedure which returns multiple rows.
But CI is executing only single row. How to fetch multiple result sets in CI ? Sample code Code: $query = $this->db->query('CALL proc_name(?,?)', array(19,'test'));
You need to cycle through the expected results with a foreach() loop as per http://www.codeigniter.com/userguide3/da...sults.html
Something like this: Code: foreach ($query->result() as $row)
Thanks for the reply.
Since I have 2 or more select queries in my stored procedure, it will still execute the first select statement results only. The next statements are not executing.
Maybe this will help
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
have you tried var_dump in your result? to see the data structures?
God Bless CI Contributors
|
Welcome Guest, Not a member yet? Register Sign In |