1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
Files
archived-php-src/ext/oci8/tests/fetch.phpt
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

57 lines
975 B
PHP

--TEST--
ocifetch() & ociresult()
--EXTENSIONS--
oci8
--FILE--
<?php
require(__DIR__."/connect.inc");
// Initialize
$stmtarray = array(
"drop table fetch_tab",
"create table fetch_tab (id number, value number)",
"insert into fetch_tab (id, value) values (1,1)",
"insert into fetch_tab (id, value) values (1,1)",
"insert into fetch_tab (id, value) values (1,1)",
);
oci8_test_sql_execute($c, $stmtarray);
// Run Test
if (!($s = oci_parse($c, "select * from fetch_tab"))) {
die("oci_parse(select) failed!\n");
}
if (!oci_execute($s)) {
die("oci_execute(select) failed!\n");
}
while(oci_fetch($s)) {
$row = oci_result($s, 1);
$row1 = oci_result($s, 2);
var_dump($row);
var_dump($row1);
}
// Cleanup
$stmtarray = array(
"drop table fetch_tab"
);
oci8_test_sql_execute($c, $stmtarray);
echo "Done\n";
?>
--EXPECT--
string(1) "1"
string(1) "1"
string(1) "1"
string(1) "1"
string(1) "1"
string(1) "1"
Done