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 t
Another solution, when the other did not work
$query = "SELECT *
From \`base\x20hojas\`";
Configuration test :
Linux version 2.6.32-32-pve (gcc version 4.7.2 (Debian 4.7.2-5) )
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
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;
";