Seems to work but still a trouble

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Perfidus
Forum Contributor
Posts: 114
Joined: Sun Nov 02, 2003 9:54 pm

Seems to work but still a trouble

Post 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')
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Is Modo an auto-incrementing ID?

Mac
Perfidus
Forum Contributor
Posts: 114
Joined: Sun Nov 02, 2003 9:54 pm

Post 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')
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

What is the name of the primary key for the record?

Mac
Perfidus
Forum Contributor
Posts: 114
Joined: Sun Nov 02, 2003 9:54 pm

It works now!!

Post 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!
Post Reply