Yes.
Questions remain as to why.
Also how safe is it ?
You should never use $wpdb->prepare with data from a .sql file that was created by an external script (mysqldump, phpMyAdmin, etc). The queries in those files are already properly escaped.
The WordPress DBAL does not support the execution of multiple queries from a single function call. That will require custom code that grabs the DB handle and uses mysqli_multi_query() to execute all the queries at once. Before you use this function, hwoever, please make sure to read the following:
https://secure.php.net/manual/en/mysqli.multi-query.php
I did figure out that prepare wasn’t necessary for this, but thanks for reinforcing that.
I have reworked everything to use mysqli_multi_query() and I’m getting a syntax error:
First query failed…You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘SET @newid = last_insert_id()
SET @symbol = ‘COST’
SET @tagID = (SELECT tagID ‘ at line 4
Each query must be terminated with a semicolon.
Yeah they all had semicolons already. Missed the single quotes around the table name on the previous line. That was the issue.
thanks again!