Ok here is the code I am using:

PHP Code:
if (mysqli_more_results($link)) {
   
mysqli_next_result($link);

I am using this because I am running multiple stored procedures on the same page. The error I am getting is this:

There is no next result set. Please, call mysqli_more_results()/mysqli::more_results() to check whether to call this function/method

Wouldn't the above code do what it is asking me to do in the error? The error is coming on the line that is the mysqli_next_result($link) so that is the confusing part. Is mysqli_more_results() not working correctly or what could be the problem?