|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-03 12:37 UTC] fmk@php.net
[2003-07-07 04:13 UTC] andrea dot balducci at antos dot it
[2003-08-12 16:15 UTC] gusthac at cdlnet dot com dot br
[2003-08-25 02:35 UTC] andrea dot balducci at antos dot it
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
Description: ------------ I'm trying to insert chars like ? ? ? ? ? in a sql server 2K table. Sometimes the chars are traslated in others. Tryed with php 4.x and 5 Reproduce code: --------------- Table Sample: CREATE TABLE pippo ( [a] [text] COLLATE Latin1_General_CI_AS NULL , [b] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) Script sample: <?php $conn = mssql_connect('localhost','sa',''); if (!mssql_select_db('mydb', $conn)) { mssql_close($conn); return 0; } mssql_query("INSERT INTO PIPPO (A,B) VALUES ('??????','??????')", $conn); mssql_close($conn); ?> Expected result: ---------------- Select * from pippo A B ------- ------- ?????? ?????? Actual result: -------------- Select * from pippo A B ------- ------- =????? =????? Using Sql Profiler i've discovered that the query issued to sql server by mssql_query has the characters already changed. So sql exec "INSERT INTO PIPPO (A,B) VALUES ('=?????','=?????')"