I want to create a table in mySQL with the name of "123 Product", with numbers in the beginning and a space in between. I can do this using phpmyAdmin but I want to make this table using php. But, unfortunately, I am unable to do this. I tried searching about this topic but I was not able to find an accurate answer which would solve the problem.
解决方案
You can simply try this: enclose table name with backticks (`)
$sql = "
CREATE TABLE `123 Product`
(
`product_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`product_name` VARCHAR(255) NOT NULL
)
ENGINE = InnoDB;
";