odbc_longreadlen

bool odbc_longreadlen(resource result, int length) 

Alters handling of LONG columns.

Returns:

Always TRUE

Description:

This function works closely with odbc_binmode() to control how data from certain database fields (in this case, LONG and LONGVARBINARY) is handled. The length parameter controls the number of bytes sent through to PHP, while a value of 0 causes the column data to pass straight through.

Version:

Existing since version 3.0.6

Example:

Set LONG byte size
$db = odbc_connect("DSN","user","pass"); 
$result = odbc_exec($db, "SELECT Notes FROM Employees"); 
odbc_longreadlen($result, 4096); 
echo odbc_result($result,1); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.