1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/odbc/tests/odbc_longreadlen_001.phpt
2023-08-23 21:20:41 +02:00

32 lines
671 B
PHP

--TEST--
Test odbc_longreadlen()
--EXTENSIONS--
odbc
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include 'config.inc';
$conn = odbc_connect($dsn, $user, $pass);
odbc_exec($conn, "CREATE TABLE longreadlen (id INT, whatever VARBINARY(50))");
odbc_exec($conn, "INSERT INTO longreadlen VALUES (1, CONVERT(VARBINARY(50), 'whatever'))");
$res = odbc_exec($conn, "SELECT * FROM longreadlen");
odbc_longreadlen($res, 4);
odbc_fetch_row($res);
var_dump(odbc_result($res, 'whatever'));
odbc_close($conn);
?>
--CLEAN--
<?php
include 'config.inc';
$conn = odbc_connect($dsn, $user, $pass);
odbc_exec($conn, "DROP TABLE longreadlen");
?>
--EXPECT--
string(4) "what"