I'm trying to create a table with mysqli->prepare
, but get an error while preparing the statement.
My statement is as follows:
$mysqli->prepare("CREATE TABLE ? (id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY (id))");
Then I just bind the table name to it
$mysqli->bind_param("s", $some_name);
And execute it.
$mysqli->execute();
The error I get is:
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 '? (id INT AUTO_INCREMENT NOT NULL, PRIMARY KE' at line 1
Can you help me?