I have a table that has numerica column names.
Now, i created the table in phpMyAdmin and it worked fine.
But when I used the script i made to restore my db structure, it won't create the table sayingHere's the sql:desktops_sizes table creation failed!
You have an error in your SQL syntax near '640 tinyint(1) NOT NULL default '0', 640_img varchar(150) default 'http://ww' at line 4Any idea why i'm getting this error?Code:$sql_desktops_sizes = "CREATE TABLE desktops_sizes ( size_id tinyint(3) NOT NULL auto_increment, desktop_id tinyint(2) NOT NULL default '0', 640 tinyint(1) NOT NULL default '0', 640_img varchar(150) default 'http://www.webinfractions.com/images/desktops/', 800 tinyint(1) NOT NULL default '0', 800_img varchar(150) default 'http://www.webinfractions.com/images/desktops/', 1024 tinyint(1) NOT NULL default '0', 1024_img varchar(150) default 'http://www.webinfractions.com/images/desktops/', 1280 tinyint(1) NOT NULL default '0', 1280_img varchar(150) default 'http://www.webinfractions.com/images/desktops/', PRIMARY KEY (size_id), UNIQUE KEY desktop_id (desktop_id) ) TYPE=MyISAM;";




you need to use backticks around the column names -- `640` -- which is what POS phpMyAdmin does. but you should really rename the columns.




Bookmarks