Page 1 of 1

Seems to work but still a trouble

Posted: Mon Nov 03, 2003 4:55 am
by Perfidus
[Admin Edit: Follow on from viewtopic.php?t=14234]

Duplicate entry '0' for key 1
INSERT INTO DatosInmueble ( Modo, Localidad, Zona, Dirección, Habitaciones, Banyos, Superficie, Precio, Descripcion, Gas, Aire_Acond, Pta_Blindada, Ascensor, Garaje, Trastero, Calefaccion, Terraza, Armarios, Balcon, Piscina, cocinael, cocinagas, lavavajillas, cafetera, microhondas, horno, zonajuegos, basket, futbol, tenis, accesplaya, minusvalidos, tele, parabolica, video, equipomus, cajafuerte, tranquilo, entornoint, zonacomer, zonaocionoc, calific, tren, carretera, aeropuerto, iglesia, todoelagno, masde1, masde2, metrosplaya, metroscentro, alarma, toilet)VALUES ('', 'Sitges', 'camaleon', '', '3', '2', '', '', 'ewrdmjdjd ferhetjd', '', '1', '', '1', '1', '1', '', '4', '', '8', '', '1', '', '1', '1', '1', '', '', '', '1', '1', '', '1', '', '1', '1', '', '', '1', '1', '', '1', '3', '1', '1', '1', '1', '1', '', '', '45', '67', '', '5')

Posted: Mon Nov 03, 2003 5:09 am
by twigletmac
Is Modo an auto-incrementing ID?

Mac

Posted: Mon Nov 03, 2003 5:29 am
by Perfidus
The problem with modo is fixed, modo is a field that should have been deleted before. In it's place the correct field is Tipo. Already changed but:

Duplicate entry '0' for key 1
INSERT INTO DatosInmueble ( Tipo, Localidad, Zona, Dirección, Habitaciones, Banyos, Superficie, Precio, Descripcion, Gas, Aire_Acond, Pta_Blindada, Ascensor, Garaje, Trastero, Calefaccion, Terraza, Armarios, Balcon, Piscina, cocinael, cocinagas, lavavajillas, cafetera, microhondas, horno, zonajuegos, basket, futbol, tenis, accesplaya, minusvalidos, tele, parabolica, video, equipomus, cajafuerte, tranquilo, entornoint, zonacomer, zonaocionoc, calific, tren, carretera, aeropuerto, iglesia, todoelagno, masde1, masde2, metrosplaya, metroscentro, alarma, toilet)VALUES ('Apartamento', 'Sitges', 'camoto1', 'camoto2', '4', '3', '', '', 'trhrthjh', '', '1', '', '1', '', '1', '', '8', '', '4', '1', '1', '1', '', '1', '', '1', '1', '', '1', '1', '1', '', '1', '1', '', '1', '1', '1', '1', '', '1', '4', '1', '1', '1', '1', '1', '1', '1', '34', '67', '', '2')

Posted: Mon Nov 03, 2003 5:41 am
by twigletmac
What is the name of the primary key for the record?

Mac

It works now!!

Posted: Mon Nov 03, 2003 5:46 am
by Perfidus
There's was another residual field in the database, that was key 1.
Now it is fixed and database is starting to be filled!
Thank you Twigled mac!