Updated ADOdb to latest version 4.60

This commit is contained in:
moodler
2005-02-18 08:37:18 +00:00
parent a48e8c4b7e
commit d43985607d
113 changed files with 4154 additions and 1371 deletions
+17 -7
View File
@@ -1,6 +1,6 @@
<?php
/*
V4.51 29 July 2004 (c) 2000-2004 John Lim ([email protected]). All rights reserved.
V4.60 24 Jan 2005 (c) 2000-2005 John Lim ([email protected]). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
@@ -18,24 +18,31 @@ include("$path/../adodb.inc.php");
echo "<h3>PHP ".PHP_VERSION."</h3>\n";
try {
$dbt = 'oci8po';
$dbt = 'mysql';
try {
switch($dbt) {
case 'oci8po':
$db = NewADOConnection("oci8po");
$db->Connect('','scott','natsoft');
break;
default:
case 'mysql':
$db = NewADOConnection("mysql");
$db->Connect('localhost','root','','test');
$db->Connect('localhost','roots','','northwind');
break;
case 'mysqli':
$db = NewADOConnection("mysqli://root:@localhost/test");
$db = NewADOConnection("mysqli://root:@localhost/northwind");
//$db->Connect('localhost','root','','test');
break;
}
} catch (exception $e){
echo "Connect Failed";
adodb_pr($e);
die();
}
$db->debug=1;
@@ -44,16 +51,19 @@ $stmt = $db->Prepare("select * from adoxyz where ?<id and id<?");
if (!$stmt) echo $db->ErrorMsg(),"\n";
$rs = $db->Execute($stmt,array(10,20));
echo "<hr> Foreach Iterator Test (rand=".rand().")<hr>";
$i = 0;
foreach($rs as $v) {
foreach($rs as $v) {
$i += 1;
echo "rec $i: "; adodb_pr($v); adodb_pr($rs->fields);
echo "rec $i: "; $s1 = adodb_pr($v,true); $s2 = adodb_pr($rs->fields,true);
if ($s1 != $s2 && !empty($v)) {adodb_pr($s1); adodb_pr($s2);}
else echo "passed<br>";
flush();
}
if ($i != $cnt) die("actual cnt is $i, cnt should be $cnt\n");
else echo "Count $i is correct<br>";
$rs = $db->Execute("select bad from badder");