1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
--TEST--
Bug #73725 Unable to retrieve value of varchar(max) type
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include dirname(__FILE__) . "/config.inc";
$conn = odbc_connect($dsn, $user, $pass);
odbc_do($conn, "CREATE TABLE bug73725(i int, txt varchar(max), k int)");
odbc_do($conn, "INSERT INTO bug73725 VALUES(101,'Any text', 33)");
odbc_do($conn, "INSERT INTO bug73725 VALUES(102,'Müsliriegel', 34)");
$rc = odbc_do($conn, "SELECT i, txt, k FROM bug73725");
$r = odbc_fetch_array($rc);
var_dump($r);
$r = odbc_fetch_array($rc);
var_dump($r);
?>
==DONE==
--EXPECT--
array(3) {
["i"]=>
string(3) "101"
["txt"]=>
string(8) "Any text"
["k"]=>
string(2) "33"
}
array(3) {
["i"]=>
string(3) "102"
["txt"]=>
string(12) "Müsliriegel"
["k"]=>
string(2) "34"
}
==DONE==
--CLEAN--
<?php
include 'config.inc';
$conn = odbc_connect($dsn, $user, $pass);
odbc_exec($conn, 'DROP TABLE bug73725');
odbc_close($conn);
?>
|