/    Sign up×
Community /Pin to ProfileBookmark

Help with Troubleshooting

Ok here is the code I am using:

[code=php]
if (mysqli_more_results($link)) {
mysqli_next_result($link);
}
[/code]

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

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

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?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogOct 03.2013 — I've never used mysqli_multi_query() (I assume [I]you[/I] are?), so cannot contribute much based on experience. It does look, however, like you could not bother using that function, and just test whether or now mysqli_next_query() returns false or not.
[code=php]
do {
// do stuff with a result set here...
// ...then:
} while (mysqli_next_result($link));
[/code]
×

Success!

Help @mcco spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...