note 88364 deleted from function.oci-bind-by-name by sixd

From: Date: Sat, 14 Nov 2009 00:59:55 +0000
Subject: note 88364 deleted from function.oci-bind-by-name by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162895@lists.php.net to get a copy of this message
Note Submitter: php at stock-consulting dot com ---- If your database contains CHAR columns, you cannot use blank-padded comparison sematics with bind variables. VARCHAR columns are not affected! Example: Table "tab" has a column "col" defined as "CHAR(20)". One row in the table contains the value "hello world" in the column "col". The query SELECT * FROM tab WHERE col = 'hello world' will return one row, as expected. The query SELECT * FROM tab WHERE col = :bindvar will return zero rows if you bound :bindvar to 'hello world'. Since col is of type CHAR(20), and :bindvar is apparently assumed to be of type VARCHAR2, Oracle will use use NON-blank-padded comparision semantics.

« previous php.notes (#162895) next »