CodeIgniter Forums
Empty storage procedures - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: General Help (
+--- Thread: Empty storage procedures (/showthread.php?tid=66053)

Empty storage procedures - markus18 - 08-29-2016

Hi, I have a problem about mysql stored procedures that i can't resolve, i tried a lot of configurations with mysqli_next_result free_result reconnect and nothing works.

The function getListProds($listID) is inside of foreach so it be called several times.

When I run the code I get all data as empty (0 rows). I find no solution. I've tried a lot of things. Right now I have the following:

It seems to all times returns first query result ( that is empty )

PHP Code:
   public function getListProds($listID){
       $superID 0;
       $query $this->db->query("CALL getList('".$listID."',".$superID.")");
       mysqli_next_result$this->db->conn_id );

       $num_rows $query->num_rows();
       $datas $query->result_array();

       if($num_rows == 0){
           return null;
           return $datas;

Thanks for all.

RE: Empty storage procedures - markus18 - 08-30-2016

Solved with adding this lines after query:

PHP Code: