odbc_binmode
odbc_binmode
Handling of binary column data
true **odbc_binmode** Odbc\Result $statement int $mode
Controls handling of binary column data. ODBC SQL types affected are
, , and
.
The default mode can be set using the
php.ini directive.
BINARY``VARBINARY``LONGVARBINARYuodbc.defaultbinmode
When binary SQL data is converted to character C data (), each byte
(8 bits) of source data is represented as two ASCII characters.
These characters are the ASCII character representation of the
number in its hexadecimal form. For example, a binary
is converted to
and a binary
is converted to .
ODBC_BINMODE_CONVERT``00000001``"01"``11111111``"FF"
While the handling of and columns only depend on the binmode, the handling of columns also depends on the longreadlen as well:
BINARY``VARBINARY``LONGVARBINARY
If is used, passthru means that an
empty string is returned for these columns.
If is used, passthru means that the data are
sent directly to the client (i.e. printed).
odbc_fetch_into``odbc_result
statementodbc.result.object.
mode
Possible values for are:
`mode`- : Passthru BINARY data `ODBC_BINMODE_PASSTHRU`
- : Return as is
ODBC_BINMODE_RETURN - : Convert to char and return
ODBC_BINMODE_CONVERT
Opmerking: > Handling of binary long columns is also affected by .
odbc_longreadlen
return.true.always