Reputation: 169
Hello I have a table called 'comisiones' described as follows:
when I try to insert a new element with this query:
INSERT INTO comisiones (id,serial,descripcion,fecha,precio) VALUES (0,"111111111111111","Iphone 5 instalacion de aplicaciones","09/06/2016",2000);
I get this error:
INSERT INTO comisiones (id,serial,descripcion,fecha,precio) VALUES (0,"111111111111111","Iphone 5 instalacion de aplicaciones","09/06/2016",2000)
Error Code: 1054. Unknown column 'fecha' in 'field list'
with SHOW CREATE TABLE comisiones; I get this:
CREATE TABLE `comisiones` (
`id` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT,
`serial` varchar(15) COLLATE utf8_spanish_ci NOT NULL,
`descripcion` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
`fecha` varchar(10) COLLATE utf8_spanish_ci NOT NULL,
`precio` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci
Upvotes: 1
Views: 74
Reputation: 169
I answer myself I had to delete the table and create it again and now is working fine
Upvotes: 1