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.