ID: 26280
User updated by: jochen dot daum at cabletalk dot co dot nz
Reported By: jochen dot daum at cabletalk dot co dot nz
-Status: Feedback
+Status: Open
Bug Type: MSSQL related
Operating System: Linux Debian woody
PHP Version: 4CVS-2003-11-16 (stable)
New Comment:

I already tested it with php4-STABLE-200311170030, which is teh same as
[url]http://snaps.php.net/php4-STABLE-latest.tar.gz[/url]


Previous Comments:
------------------------------------------------------------------------

[2003-11-16 21:56:40] [email]moriyoshi@php.net[/email]

Please try using this CVS snapshot:

[url]http://snaps.php.net/php4-STABLE-latest.tar.gz[/url]

For Windows:

[url]http://snaps.php.net/win32/php4-win32-STABLE-latest.zip[/url]

------------------------------------------------------------------------

[2003-11-16 21:45:54] jochen dot daum at cabletalk dot co dot nz

Description:
------------
Hi!

An update query, which contains a character with an ascii code > 128
gets cut off at the position of the character and not executed, because
apparently the syntax is wrong.

Test script:

<?

error_reporting(E_ALL);

$c = mssql_connect ("10.1.1.1:1433", "xxxxx", "xxxxx");

mssql_select_db("xxxxxx", $c);

$sql = "update test set field = '‹test' where id=1";

$res = mssql_query ($sql, $c);

?>

result:

Warning: mssql_query(): message: Unclosed quotation mark before the
character string '?.H.????????..??'. (severity 15) in
/var/www/cabletalk/test.php on line 11

Warning: mssql_query(): message: Line 1: Incorrect syntax near
'?.H.????????..??'. (severity 15) in /var/www/cabletalk/test.php on
line 11

Warning: mssql_query(): Query failed in /var/www/cabletalk/test.php on
line 11


Found this bug in php-4.3.2, my config-line:

../configure --with-mysql --with-apxs
--with-crack=/var/www/install/cracklib2.7 --with-mssql --with-gd
--with-png-dir --enable-gd-native-ttf --with-ttf --with-curl
--enable-wddx --with-zlib-dir= --with-informix=/opt/informix
--enable-sockets --with-freetype-dir --with-ldap

Then confirmed it in php4-STABLE-200311170030 with the same config
line.

I use freetds-dev/testing 0.61-4 on debian woody



Reproduce code:
---------------
see above

Expected result:
----------------
to run the update statement. It runs in SQL Server Query Analyzer



------------------------------------------------------------------------


--
Edit this bug report at [url]http://bugs.php.net/?id=26280&edit=1[/url]