@@ -22,20 +22,20 @@ pdo_ibm: Select LOBs, including null and 0-length
22
22
$ create = 'CREATE TABLE animals (id INTEGER, my_clob clob, my_blob blob) ' ;
23
23
$ result = $ this ->db ->exec ( $ create );
24
24
25
- $ data = array (
26
- array (1 , 'this is the clob that never ends... ' ,
27
- 'this is the blob that never ends... ' )
25
+ $ data = array (
26
+ array (1 , 'this is the clob that never ends... ' ,
27
+ 'this is the blob that never ends... ' )
28
28
,
29
- array (2 , null ,null )
29
+ array (2 , null ,null )
30
30
,
31
31
array (3 ,'' ,'' )
32
- );
32
+ );
33
33
34
34
$ stmt = $ this ->db ->prepare ('insert into animals (id,my_clob,my_blob) values (?,?,?) ' );
35
35
36
36
print "inserting \n" ;
37
37
foreach ($ data as $ row ) {
38
- $ stmt ->execute ($ row );
38
+ $ stmt ->execute ($ row );
39
39
}
40
40
41
41
print "succesful \n" ;
@@ -45,19 +45,20 @@ pdo_ibm: Select LOBs, including null and 0-length
45
45
46
46
$ rs = $ stmt ->execute ();
47
47
48
- $ count = 0 ;
48
+ $ count = 0 ;
49
49
while ($ row = $ stmt ->fetch (PDO ::FETCH_ASSOC )) {
50
50
var_dump ( $ row ['ID ' ] );
51
51
52
- // this is a temporary workaround
53
- // until zero-length/lob stream
54
- // issue is fixed
55
- if ($ count < 2 ) {
52
+ // this is a temporary workaround
53
+ // until zero-length/lob stream
54
+ // issue is fixed
55
+ if ($ count < 2 ) {
56
56
var_dump ( $ row ['MY_CLOB ' ] );
57
- var_dump ( $ row ['MY_BLOB ' ] );
58
- }
59
- var_dump (strpos ($ row ['MY_CLOB ' ], 'lob ' ));
60
- $ count ++;
57
+ var_dump ( $ row ['MY_BLOB ' ] );
58
+ }
59
+ // suppressed deprecation message for NULL on 8.1
60
+ var_dump (@strpos ($ row ['MY_CLOB ' ], 'lob ' ));
61
+ $ count ++;
61
62
}
62
63
63
64
print "done \n" ;
0 commit comments