Documentation TYPO3 par Ameos |
00001 <?php 00002 /* 00003 V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jlim#natsoft.com.my). All rights reserved. 00004 Released under both BSD license and Lesser GPL library license. 00005 Whenever there is any discrepancy between the two licenses, 00006 the BSD license will take precedence. 00007 Set tabs to 8. 00008 */ 00009 00010 00011 error_reporting(E_ALL); 00012 00013 $path = dirname(__FILE__); 00014 00015 include("$path/../adodb-exceptions.inc.php"); 00016 include("$path/../adodb.inc.php"); 00017 00018 try { 00019 $db = NewADOConnection("oci8"); 00020 $db->Connect('','scott','natsoft'); 00021 $db->debug=1; 00022 00023 $cnt = $db->GetOne("select count(*) from adoxyz"); 00024 $rs = $db->Execute("select * from adoxyz order by id"); 00025 00026 $i = 0; 00027 foreach($rs as $k => $v) { 00028 $i += 1; 00029 echo $k; adodb_pr($v); 00030 flush(); 00031 } 00032 00033 if ($i != $cnt) die("actual cnt is $i, cnt should be $cnt\n"); 00034 00035 00036 00037 $rs = $db->Execute("select bad from badder"); 00038 00039 } catch (exception $e) { 00040 adodb_pr($e); 00041 $e = adodb_backtrace($e->trace); 00042 } 00043 00044 ?>