thread_id; /* Kill connection */ $mysqli->kill($thread_id); /* This should produce an error */ if (!$mysqli->query(“CREATE TABLE myCity LIKE City”)) { printf(“Error: %sn”, $mysqli->error); exit; } /* close connection */ $mysqli->close(); ?>
The above examples will output:
Error: MySQL server has gone away