fixed typo in security checks for prescription access
[openemr.git] / library / adodb / tests / testoci8.php
blobd748efca463af2d0b52fd462f3f9f93319c80d02
1 <html>
2 <body>
3 <?php
4 /*
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/
13 error_reporting(63);
14 include("../adodb.inc.php");
15 include("../tohtml.inc.php");
17 if (1) {
18 $db = ADONewConnection('oci8po');
20 $db->PConnect('','scott','tiger');
22 if (!empty($testblob)) {
23 $varHoldingBlob = 'ABC DEF GEF John TEST';
24 $num = time()%10240;
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");
33 rs2html($rs);
35 $stmt = $db->Prepare('select * from adoxyz where id=?');
36 for ($i = 1; $i <= 10; $i++) {
37 $rs = &$db->Execute(
38 $stmt,
39 array($i));
41 if (!$rs) die("Empty RS");
42 if ($rs->EOF) die("EOF RS");
43 rs2html($rs);
46 if (1) {
47 $db = ADONewConnection('oci8');
48 $db->PConnect('','scott','tiger');
49 $db->debug = true;
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");
59 if (0) {
60 $db = ADONewConnection('odbc_oracle');
61 if (!$db->PConnect('local_oracle','scott','tiger')) die('fail connect');
62 $db->debug = true;
63 $rs = &$db->Execute(
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");
68 rs2html($rs);