Bug->Req #67495 [Opn]: cannot quote binary values

From: Date: Mon, 12 Sep 2016 21:24:05 +0000
Subject: Bug->Req #67495 [Opn]: cannot quote binary values
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203979@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67495&edit=1 ID: 67495 Updated by: adambaratz@php.net Reported by: vytas dot LT at gmail dot com -Summary: pdo_dblib incorrectly escapes binary and unicode values +Summary: cannot quote binary values Status: Open -Type: Bug +Type: Feature/Change Request Package: PDO DBlib -PHP Version: 5.6Git-2014-06-22 (Git) +PHP Version: Irrelevant Block user comment: N Private report: N New Comment: This is a limitation of how PDO handles types. See #60818 for a request to allow NVARCHAR quoting. Previous Comments: ------------------------------------------------------------------------ [2015-09-23 20:07:30] reyad dot attiyat at gmail dot com Related To: Bug #70565 ------------------------------------------------------------------------ [2014-07-30 12:25:08] kraven at kraven dot org I can confirm this is an issue for a long time now. This fix will remove the need for the workaround in Propel ORM 1.7.x runtime/lib/adapter/DBMSSQL.php cleanupSQL method. ------------------------------------------------------------------------ [2014-06-22 21:01:57] sdfghjk at fff dot lt e ble ------------------------------------------------------------------------ [2014-06-22 20:49:08] vytas dot LT at gmail dot com Description: ------------ For storing unicode text MSSQL has nchar and nvarchar column types However, pdo_dblib extension does not correctly escapes unicode strings. Those strings must be prefixed with N prefix - e.g. INSERT INTO table(field) (N'unicode_value') UPDATE table SET field = N'unicode_value' WHERE code = N'unicode_value' Likewise binary, varbinary and blob should be escaped like unquoted hexadamical notation starting with 0x - e. g. INSERT INTO table(binfield) (0xAAFFCC) UPDATE table SET binfield = 0xAAFFCC WHERE code = 0xCCAAFF ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67495&edit=1

« previous php.bugs (#203979) next »