Because when doing a first query to a call and then trying to make another one the php hangs? For example, running this simple stored procedure in php
DELIMITER $$
CREATE DEFINER='root'@'localhost' PROCEDURE 'curtidas_sp' (
IN '@post' INT
)
SELECT
COUNT(*) AS c_total,
FROM curtidas
WHERE id_post = '@post'$$
DELIMITER ;
running in php:
$f_dados = mysqli_query($conexao, "CALL curtidas_sp('$idPost')");
$f_resultado = mysqli_fetch_assoc($f_dados);
And then try to run down another being a call or not
$c_dados = mysqli_query($conexao, "SELECT COUNT(*) AS f_total, FROM favoritos WHERE id_post = 2");
$c_resultado = mysqli_fetch_assoc($c_dados);
Displays this error:
mysqli_fetch_array () expects parameter 1 to be mysqli_result, boolean given ...
MariaDB, InnoDB, PHP7, Stored Procedure.