I cannot spot my error what have I done incorrect?
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 ‘NUMBER(4,2),descriptiontext, PRIMARY KEY (id) ‘ at line 9
CREATE TABLE IF NOT EXISTS `{$this->db_pre}sales` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`slug` varchar(60) NOT NULL,
`location` varchar(250) NOT NULL,
`bedrooms` int(3) NOT NULL,
`bathrooms`int(3) NOT NULL,
`property_type` varchar(150) NOT NULL,
`floor_area` varchar(50) NOT NULL,
`price` NUMBER(4,2),
`description` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
The
NUMBERtype is not a part of the MySQL spec.You should use
DECIMAL(orNUMERIC— they are identical) instead.