File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / oci8 / tests / statement_cache.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:59 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
statement cache
--SKIPIF--
<?php 
$target_dbs = array('oracledb' => true, 'timesten' => true);  // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
?>
--FILE--
<?php

// Note: with TimesTen, the column will be called "EXP"

require dirname(__FILE__)."/connect.inc";

$pc = oci_pconnect($user, $password, $dbase);

$stmt = oci_parse($pc, "select 1+3 from dual");
oci_execute($stmt);
var_dump(oci_fetch_array($stmt));

$stmt = oci_parse($pc, "select 1+3 from dual");
oci_execute($stmt);
var_dump(oci_fetch_array($stmt));

echo "Done\n";
?>
--EXPECTF--	
array(2) {
  [0]=>
  string(1) "4"
  ["%r(1\+3|EXP)%r"]=>
  string(1) "4"
}
array(2) {
  [0]=>
  string(1) "4"
  ["%r(1\+3|EXP)%r"]=>
  string(1) "4"
}
Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>