yrstruly Posted May 7, 2009 Share Posted May 7, 2009 Can somebody please tell me, what is wrong with the following code:-- Table structure for table 'mos_joomla_book'CREATE TABLE 'mos_joomla_book' ('id' INT NOT NULL AUTO_INCREMENT,'text' TEXT NOT NULL,'published' TINYINT(1) NOT NULL,PRIMARY KEY ('id') );-- Data for table 'mos_joomla_book'INSERT INTO 'mos_joomla_book' VALUES (11,'BMW 1', 1);INSERT INTO 'mos_joomla_book' VALUES (9,'Renault Kangoo', 1);INSERT INTO 'mos_joomla_book' VALUES (8,'Audi A6', 1);INSERT INTO 'mos_joomla_book' VALUES (7,'VW Golf', 1);INSERT INTO 'mos_joomla_book' VALUES (10,'Mercedes G', 1);It displays this error:ErrorSQL query:-- Table structure for table 'mos_joomla_book'CREATE TABLE 'mos_joomla_book'('id'INT NOT NULL AUTO_INCREMENT ,'text'TEXT NOT NULL ,'published'TINYINT( 1 ) NOT NULL ,PRIMARY KEY ( 'id' ));MySQL said: Documentation#1064 - 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 ''mos_joomla_book' ('id' INT NOT NULL AUTO_INCREMENT,'text' TEXT NOT NULL,'' at line 1 Link to comment Share on other sites More sharing options...
justsomeguy Posted May 7, 2009 Share Posted May 7, 2009 I believe you need to use `backquotes` for table and field names instead of 'single quotes'. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.