MySQL Forums
Forum List  »  PHP

Re: $mysqli-query does not execute multiple statements
Posted by: Jason Wisdom
Date: May 13, 2021 10:29AM

Thank you; outputting the error led me to the fix.

There were 2 problems. 1, $mysqli does not like executing commands after looping through a resultset, for some reason.

2, was more simple yet subtle--when building the 3rd query (based on results from query #2) I appended a "<br/>" to the end of the $sql so I could echo it cleanly. But of course it threw a syntax error when executed in mysql. And, of course, I couldn't see the problem by using echo($sql)...until I looked at page source. Fun times.

Thanks again.

Options: ReplyQuote


Subject
Written By
Posted
Re: $mysqli-query does not execute multiple statements
May 13, 2021 10:29AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.