phdphd Posted August 20, 2015 Share Posted August 20, 2015 Hi All, I get the following message when running a multiline query through mysqli. message : Strict standards: mysqli_next_result() [<a href='function.mysqli-next-result'>function.mysqli-next-result</a>]: There is no next result set. Please, call mysqli_more_results()/mysqli::more_results() to check whether to call this function/method Here is my simplified code : $sql='SELECT CURRENT_USER();'; $sql.='SELECT CURRENT_time();'; $rs = @mysqli_multi_query($link,$sql); if (!$rs) { } else { do { if ($rs = mysqli_store_result($link)) { while ($row = mysqli_fetch_row($rs)) { echo "<br/> ". $row[0]; } mysqli_free_result($rs); } if (mysqli_more_results($link)) { echo "<br/>-----------------<br/>"; } } while (mysqli_next_result($link)); } If I use "while (mysqli_next_result($link) && mysqli_more_results($link));" instead of "while (mysqli_next_result($link))", I get no error message, but the current time (returned by the second query) won't display. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
phdphd Posted August 20, 2015 Author Share Posted August 20, 2015 Prepending mysqli_next_result with an @ would offer a visual solution, but would it be a good technical one ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.