5 V4.20 22 Feb 2004 (c) 2000-2004 John Lim (jlim@natsoft.com.my). All rights reserved.
6 Released under both BSD license and Lesser GPL library license.
7 Whenever there is any discrepancy between the two licenses,
8 the BSD license will take precedence.
9 Set tabs to 4 for best viewing.
11 Latest version is available at http://php.weblogs.com/
14 include("../adodb.inc.php");
15 include("../tohtml.inc.php");
18 $db = ADONewConnection('oci8po');
20 $db->PConnect('','scott','tiger');
22 if (!empty($testblob)) {
23 $varHoldingBlob = 'ABC DEF GEF John TEST';
25 // create table atable (id integer, ablob blob);
26 $db->Execute('insert into ATABLE (id,ablob) values('.$num.',empty_blob())');
27 $db->UpdateBlob('ATABLE', 'ablob', $varHoldingBlob, 'id='.$num, 'BLOB');
29 $rs = &$db->Execute('select * from atable');
31 if (!$rs) die("Empty RS");
32 if ($rs->EOF
) die("EOF RS");
35 $stmt = $db->Prepare('select * from adoxyz where id=?');
36 for ($i = 1; $i <= 10; $i++
) {
41 if (!$rs) die("Empty RS");
42 if ($rs->EOF
) die("EOF RS");
47 $db = ADONewConnection('oci8');
48 $db->PConnect('','scott','tiger');
50 $db->Execute("delete from emp where ename='John'");
51 print $db->Affected_Rows().'<BR>';
52 $stmt = &$db->Prepare('insert into emp (empno, ename) values (:empno, :ename)');
53 $rs = $db->Execute($stmt,array('empno'=>4321,'ename'=>'John'));
54 // prepare not quite ready for prime time
55 //$rs = $db->Execute($stmt,array('empno'=>3775,'ename'=>'John'));
56 if (!$rs) die("Empty RS");
60 $db = ADONewConnection('odbc_oracle');
61 if (!$db->PConnect('local_oracle','scott','tiger')) die('fail connect');
64 'select * from adoxyz where firstname=? and trim(lastname)=?',
65 array('first'=>'Caroline','last'=>'Miranda'));
66 if (!$rs) die("Empty RS");
67 if ($rs->EOF
) die("EOF RS");