From 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 17 Nov 2019 20:45:02 +0100 Subject: initial checking of customized version 1.0rc9 --- vendor/adodb/adodb-php/tests/testoci8cursor.php | 110 ++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 vendor/adodb/adodb-php/tests/testoci8cursor.php (limited to 'vendor/adodb/adodb-php/tests/testoci8cursor.php') diff --git a/vendor/adodb/adodb-php/tests/testoci8cursor.php b/vendor/adodb/adodb-php/tests/testoci8cursor.php new file mode 100644 index 0000000..1ea59c0 --- /dev/null +++ b/vendor/adodb/adodb-php/tests/testoci8cursor.php @@ -0,0 +1,110 @@ +PConnect('','scott','natsoft'); + $db->debug = 99; + + +/* +*/ + + define('MYNUM',5); + + + $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS,'A%'); END;"); + + if ($rs && !$rs->EOF) { + print "Test 1 RowCount: ".$rs->RecordCount()."

"; + } else { + print "Error in using Cursor Variables 1

"; + } + + print "

Testing Stored Procedures for oci8

"; + + $stid = $db->PrepareSP('BEGIN adodb.myproc('.MYNUM.', :myov); END;'); + $db->OutParameter($stid, $myov, 'myov'); + $db->Execute($stid); + if ($myov != MYNUM) print "

Error with myproc

"; + + + $stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;",true); + $a1 = 'Malaysia'; + //$a2 = ''; # a2 doesn't even need to be defined! + $db->InParameter($stmt,$a1,'a1'); + $db->OutParameter($stmt,$a2,'a2'); + $rs = $db->Execute($stmt); + if ($rs) { + if ($a2 !== 'Cinta Hati Malaysia') print "Stored Procedure Error: a2 = $a2

"; + else echo "OK: a2=$a2

"; + } else { + print "Error in using Stored Procedure IN/Out Variables

"; + } + + + $tname = 'A%'; + + $stmt = $db->PrepareSP('select * from tab where tname like :tablename'); + $db->Parameter($stmt,$tname,'tablename'); + $rs = $db->Execute($stmt); + rs2html($rs); -- cgit v1.2.3-54-g00ecf