adodb 최신버전으로 변경
<? 를 <?php 로 변경
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @version V5.06 16 Oct 2008 (c) 2000-2009 John Lim (jlim#natsoft.com). 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.
|
||||
/**
|
||||
* @version v5.20.9 21-Dec-2016
|
||||
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
|
||||
* 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.
|
||||
*
|
||||
* Set tabs to 4 for best viewing.
|
||||
*
|
||||
*
|
||||
* PEAR DB Emulation Layer for ADODB.
|
||||
*
|
||||
* The following code is modelled on PEAR DB code by Stig Bakken <ssb@fast.no> |
|
||||
@@ -15,7 +17,7 @@
|
||||
|
||||
/*
|
||||
We support:
|
||||
|
||||
|
||||
DB_Common
|
||||
---------
|
||||
query - returns PEAR_Error on error
|
||||
@@ -27,13 +29,13 @@
|
||||
quote
|
||||
nextID
|
||||
disconnect
|
||||
|
||||
|
||||
getOne
|
||||
getAssoc
|
||||
getRow
|
||||
getCol
|
||||
getAll
|
||||
|
||||
|
||||
DB_Result
|
||||
---------
|
||||
numRows - returns -1 if not supported
|
||||
@@ -42,7 +44,7 @@
|
||||
fetchRows - does not support passing of fetchmode
|
||||
free
|
||||
*/
|
||||
|
||||
|
||||
define('ADODB_PEAR',dirname(__FILE__));
|
||||
include_once "PEAR.php";
|
||||
include_once ADODB_PEAR."/adodb-errorpear.inc.php";
|
||||
@@ -52,10 +54,6 @@ if (!defined('DB_OK')) {
|
||||
define("DB_OK", 1);
|
||||
define("DB_ERROR",-1);
|
||||
|
||||
// autoExecute constants
|
||||
define('DB_AUTOQUERY_INSERT', 1);
|
||||
define('DB_AUTOQUERY_UPDATE', 2);
|
||||
|
||||
/**
|
||||
* This is a special constant that tells DB the user hasn't specified
|
||||
* any particular get mode, so the default should be used.
|
||||
@@ -183,10 +181,10 @@ class DB
|
||||
|
||||
if (isset($dsninfo['socket'])) $dsninfo['hostspec'] .= ':'.$dsninfo['socket'];
|
||||
else if (isset($dsninfo['port'])) $dsninfo['hostspec'] .= ':'.$dsninfo['port'];
|
||||
|
||||
|
||||
if($persist) $ok = $obj->PConnect($dsninfo['hostspec'], $dsninfo['username'],$dsninfo['password'],$dsninfo['database']);
|
||||
else $ok = $obj->Connect($dsninfo['hostspec'], $dsninfo['username'],$dsninfo['password'],$dsninfo['database']);
|
||||
|
||||
|
||||
if (!$ok) $obj = ADODB_PEAR_Error();
|
||||
return $obj;
|
||||
}
|
||||
@@ -212,7 +210,7 @@ class DB
|
||||
{
|
||||
if (!is_object($value)) return false;
|
||||
$class = strtolower(get_class($value));
|
||||
return $class == 'pear_error' || is_subclass_of($value, 'pear_error') ||
|
||||
return $class == 'pear_error' || is_subclass_of($value, 'pear_error') ||
|
||||
$class == 'db_error' || is_subclass_of($value, 'db_error');
|
||||
}
|
||||
|
||||
@@ -370,5 +368,3 @@ class DB
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user