I've been trying for an hour to get this to work and am at a loss at this point. This statement here is the issue. If I remove the INSERT INTO statement this works and the table is created, however when I add it back nothing happens. I've checked this is a valid SQL statement by performing directly on the DB and it works fine. Thanks for your help.
$conn->query("CREATE TABLE stock (Title varchar(255), Stock int(11)); INSERT
INTO stock VALUES('Chair', 45);");
querycan only execute 1 query (CREATE TABLEis 1 query,INSERT INTOis a second query). Also why create the table multiple times?mysqli? php.net/manual/en/mysqli.multi-query.php I'd also recommend using error reporting and see what happens when you actually execute this. Errors will help you debug