I'm working on an application which builts a form from the mysql table and then post back values to the table itself. Everything works fine, but...
Now I have added to the table some column and I have used spanish names. Among them I have used 'baños'.
Now the form is correctly displayed, the label in the form is correct and even the database error displays correctly the world 'baños' among the columns of the table... But the query fails because suddenly in the $_POST array appears a value without name (indexed to 0) and set to the same value of the input 'baños'.
In other words, the input baños is inserted in the $_POST array 2 times: associatively and numerically!:
This is the error mesages I get:
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 '0) VALUES ('GUIA DE ISORA CASA INDEPENDIENTE DE 3 HABITACIONES DE 192 m2 (COD. 6' at line 1
REPLACE INTO `immobiliaria` (`title`, `dormitorios`, `baños`, `garaje`, `piscina`, `hamaca`, `zona`, `precio`, `codigo`, `medidas`, `notas`, 0) VALUES ('GUIA DE ISORA CASA INDEPENDIENTE DE 3 HABITACIONES DE 192 m2 (COD. 625)', '', '2', '', '', '', '', '', '', '', '', '2')
The database colation is utf8_general_ci, Codeigniter is set to utf-8 charset too...
Have someone any idea? Keep in mind that if I just rename the column 'baños' to 'banos' everything works fine...
Thank you for your help, guys.