I’m trying to insert the data below into an existing table, and it gives me sql error 1064, you have an error in your sql syntax at line 3.
INSERT INTO `static_contract` (`ID`, `contractID`, `name`, `mobbaseID`, `classID`, `dialogID`, `menuoptions`, `iconID`, `notes`, `vendorID`, `pTable`, `sTable`, `itemModTable`, `allowedBuildingTypeID`)
VALUES
(2026, 2026, 'Premium Vendor', 15312, 1906, 600, '1 2 15 18', 68, 'vendor', 0, '0', '0', '', 0),
Here’s the table schema:
CREATE TABLE `static_contract` (
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`contractID` int(10) unsigned NOT NULL,
`name` varchar(100) NOT NULL DEFAULT '',
`mobbaseID` int(10) unsigned NOT NULL,
`classID` int(10) unsigned NOT NULL,
`dialogID` int(10) unsigned NOT NULL,
`menuoptions` varchar(20) NOT NULL DEFAULT '',
`iconID` tinyint(3) unsigned NOT NULL DEFAULT '0',
`notes` varchar(50) NOT NULL DEFAULT '',
`vendorID` int(10) NOT NULL DEFAULT '0',
`pTable` varchar(50) NOT NULL DEFAULT '0',
`sTable` varchar(50) NOT NULL DEFAULT '0',
`itemModTable` varchar(50) NOT NULL DEFAULT '',
`allowedBuildingTypeID` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`ID`),
KEY `fk_contracts_mobbase` (`mobbaseID`)
) ENGINE=InnoDB AUTO_INCREMENT=302900 DEFAULT CHARSET=latin1
The comma outside of your parenthesis at the end is the problem. Please select an answer to mark this question as complete.