• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Empty storage procedures

#1
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;
 
       }else{
 
           return $datas;
 
       }
 
   



Thanks for all.
Reply

#2
Solved with adding this lines after query:

PHP Code:
       $this->db->close();
       $this->db->initialize(); 
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.