From:             skissane at iips dot mq dot edu dot au
Operating system: Linux
PHP version:      4.3.7
PHP Bug Type:     MSSQL related
Bug description:  Strange SQL server error when query contains special chars

Description:
------------
running freetds 0.63

./configure:

'./configure' '--with-apxs2=/usr/sbin/apxs' '--with-mssql=/usr/local'
'--with-mysql' '--with-curl' '--with-dom' '--with-zlib' '--enable-xslt'
'--with-xslt-sablot' '--with-sablot-js' '--enable-dba' '--with-cdb'
'--with-gd' '--with-socket' '--with-ldap' 

Reproduce code:
---------------
<?
$r = mssql_connect("<servername>","<username>","<password>");
mssql_query("SELECT '" . chr(183) . "'",$r);

The above query works fine when run directly from Query Analyser.

(where <servername> is a SQL Server 2000; freetds protocol version used
8.0.)

Expected result:
----------------
No error.

Actual result:
--------------
Warning: mssql_query(): message: Unclosed quotation mark before the
character string 'ιΌ (severity 15) in
/home/skissane/adm/freetds-0.63.dev.20040622/phptest.php on line 3

Warning: mssql_query(): message: Line 1: Incorrect syntax near 'ιΌ
(severity 15) in /home/skissane/adm/freetds-0.63.dev.20040622/phptest.php
on line 3

Warning: mssql_query(): Query failed in
/home/skissane/adm/freetds-0.63.dev.20040622/phptest.php on line 3


-- 
Edit bug report at http://bugs.php.net/?id=28908&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28908&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28908&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28908&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28908&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28908&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28908&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28908&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28908&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28908&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28908&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28908&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28908&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28908&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28908&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28908&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28908&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28908&r=float

Reply via email to