Hello,
I am trying to do some calls, but the 2nd query fails with command 'Commands out of sync; you can't run this command now' error.
The code looks like this:
$sql="call listReport();";
$results = mysqli_query($link,$sql);
$arr=array();
while($row=mysqli_fetch_array($results)) {
array_push($arr,$row);
}
mysqli_free_result($results);
// then I have this
// but this fails, giving the above mentioned error
$stmt = @mysqli_prepare($link,"select ........") or die(mysqli_error($link));
@mysqli_stmt_bind_param($stmt, 's', $s);
@mysqli_stmt_execute($stmt);
@mysqli_stmt_bind_result($stmt, $s);
@mysqli_stmt_fetch($stmt);
@mysqli_stmt_close($stmt);
I actually used mysqli_free_result($results);
but doesn't worked. What do I miss?