[freetds] PHP: Inserts with Unicode

Marco Brinkmann marco_brinkmann at gmx.net
Wed Jan 21 03:25:33 EST 2004


Hi everone,

I use RedHat 8.0, MSSQL2000, PHP4.3.3 and FreeTDS (version 8.0; client
charset: UTF-8).

I can read and display all NTEXT and NVARCHAR-Fields from MSSQL correctly.
But if I try to write the read data into the database I get always the parse
error "Unclosed quotation mark...".

The Insert looks like...

db("INSERT INTO table (test) (N'".addslashes($read)."')");

If I echo the SQL and use it in the Enterprise Manager everything works
correctly. Any clues?

Thanks,

mabrin

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail



More information about the FreeTDS mailing list