I've been searching this topic, but haven´t found any solution; there was a similar question, but it is not solved: Working with characters with accents in sql query and table name
I'm working with a database on a SQL Server 2005 that uses Modern_Spanish_CI_AS as collation. I'm developing a web front-end using PHP, and I am stuck with an accent problem.
There's a table (let's say "Objetos") whose fields are: ID Name Descripción
I can´t query this table because of the accent. If I build my query "Select a.ID, a.Name FROM Objetos"
it works perfect, but if changed into "Select a.ID, a.Descripción FROM Objetos"
it returns zero rows.
I can´t change the collation of the database, so I have been decoding the queries before sending them $ssql = utf8_decode($ssql);
... It is strange, using this workaround I can do INSERT
, but cant SELECT
.
Any ideas? Thanks