1--TEST-- 2Sybase-CT bug #43578 (Incurred fault #6 - if returned textfield ist empty) 3--SKIPIF-- 4<?php require('skipif.inc'); ?> 5--FILE-- 6<?php 7/* This file is part of PHP test framework for ext/sybase_ct 8 * 9 * $Id$ 10 */ 11 12 require('test.inc'); 13 14 $db= sybase_connect_ex(); 15 16 // Create a temporary table and fill it with test values 17 var_dump(sybase_query(' 18 create table #Resource ( 19 Resource_ID int, 20 DC_Rights text null 21 ) 22 ', $db)); 23 var_dump(sybase_query('insert into #Resource values (123, NULL)', $db)); 24 var_dump(sybase_query('insert into #Resource values (124, "")', $db)); 25 26 // Select non-existant 27 var_dump(sybase_select_ex($db, 'select DC_Rights from #Resource where Resource_ID = 122')); 28 29 // Select null 30 var_dump(sybase_select_ex($db, 'select DC_Rights from #Resource where Resource_ID = 123')); 31 32 // Select empty 33 var_dump(sybase_select_ex($db, 'select DC_Rights from #Resource where Resource_ID = 124')); 34 35 // Clean up and close connection 36 var_dump(sybase_query('drop table #Resource', $db)); 37 sybase_close($db); 38?> 39--EXPECTF-- 40bool(true) 41bool(true) 42bool(true) 43>>> Query: select DC_Rights from #Resource where Resource_ID = 122 44<<< Return: resource 45array(0) { 46} 47>>> Query: select DC_Rights from #Resource where Resource_ID = 123 48<<< Return: resource 49array(1) { 50 [0]=> 51 array(1) { 52 ["DC_Rights"]=> 53 NULL 54 } 55} 56>>> Query: select DC_Rights from #Resource where Resource_ID = 124 57<<< Return: resource 58array(1) { 59 [0]=> 60 array(1) { 61 ["DC_Rights"]=> 62 string(1) " " 63 } 64} 65bool(true) 66