For some reason, I am receiving the following MySQL Error, but I cannot seem to put my finger on the place where I am going wrong. Please can you tell me the location of the error and how I can fix it?
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 ‘"4ed2a19702d5feaa1eea283f", ‘Pizza Hut’, ‘Pizza Place’,
51.604771458125, -0.1884′ at line 1
Query:
INSERT INTO `venues` (`fq_id`, `title`, `category`, `latitude`, `longitude`, `location`) ('4ed2a19702d5feaa1eea283f', 'Pizza Hut', 'Pizza Place', 51.604771458125, -0.18844127655029, '{\"address\":\"128 Ballards Lane\",\"lat\":51.604771458125,\"lng\":-0.18844127655029,\"postalCode\":\"N3 2PA\",\"city\":\"London\",\"country\":\"United Kingdom\",\"cc\":\"GB\",\"distance\":0}')
Table Structure:
CREATE TABLE `venues` (
`fq_id` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`location` text NOT NULL,
`category` varchar(50) NOT NULL,
`latitude` float(10,6) NOT NULL,
`longitude` float(10,6) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`fq_id`),
KEY `category` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
You’ve missed the
VALUESkeyword: