Why does my script exit prematurely as soon as it frees the result set? This is undesired.
for ($loop=0; $loop<count($sqld); $loop++) {
try {
if ($first_delete < 1)
echo "$sqld[$loop] \n";
$result = $mysqli->query($sqld[$loop]);
printf("Affected rows (DELETE): %d\n", $mysqli->affected_rows);
// free result set
$result->close(); // for some odd reason the script exits after this!