I appreciate the advice from crmccar at gmail dot com regarding the proper way to check for errors, but I would get an error with his/her code. I fixed it by changing the code a little:
<?php
$sql = file_get_contents( 'sql/test_' . $id . '_data.sql');
$query_array = explode(';', $sql);
$i = 0;
if( $this->mysqli->multi_query( $sql ) )
{
do {
$this->mysqli->next_result();
$i++;
}
while( $this->mysqli->more_results() );
}
if( $this->mysqli->errno )
{
die(
'<h1>ERROR</h1>
Query #' . ( $i + 1 ) . ' of <b>test_' . $id . '_data.sql</b>:<br /><br />
<pre>' . $query_array[ $i ] . '</pre><br /><br />
<span style="color:red;">' . $this->mysqli->error . '</span>'
);
}
?>