1--TEST--
2Test odbc_longreadlen()
3--EXTENSIONS--
4odbc
5--SKIPIF--
6<?php include 'skipif.inc'; ?>
7--FILE--
8<?php
9include 'config.inc';
10
11$conn = odbc_connect($dsn, $user, $pass);
12
13odbc_exec($conn, "CREATE TABLE longreadlen (id INT, whatever VARBINARY(50))");
14odbc_exec($conn, "INSERT INTO longreadlen VALUES (1, CONVERT(VARBINARY(50), 'whatever'))");
15
16$res = odbc_exec($conn, "SELECT * FROM longreadlen");
17odbc_longreadlen($res, 4);
18odbc_fetch_row($res);
19var_dump(odbc_result($res, 'whatever'));
20
21odbc_close($conn);
22?>
23--CLEAN--
24<?php
25include 'config.inc';
26
27$conn = odbc_connect($dsn, $user, $pass);
28odbc_exec($conn, "DROP TABLE longreadlen");
29?>
30--EXPECT--
31string(4) "what"
32