Source for file DB.php
Documentation is available at DB.php
// +----------------------------------------------------------------------+
// | PEAR :: DB_NestedSet_DB |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Daniel Khan <dk@webcluster.at> |
// +----------------------------------------------------------------------+
// $Id: DB.php,v 1.14 2004/04/02 00:15:06 datenpunk Exp $
// {{{ DB_NestedSet_DB:: class
* Wrapper class for PEAR::DB
* @author Daniel Khan <dk@webcluster.at>
* @version $Revision: 1.14 $
* @param mixed $dsn DSN as PEAR dsn URI or dsn Array
* @param array $params Database column fields which should be returned
$this->_debugMessage ('DB_NestedSet_DB($dsn, $params = array())');
$this->DB_NestedSet ($params);
$this->db = & $this->_db_Connect ($dsn);
$this->db->setFetchMode (DB_FETCHMODE_ASSOC );
$this->_debugMessage ('_DB_NestedSet_DB()');
* @return object DB The database object
function & _db_Connect ($dsn) {
$this->_debugMessage ('_db_Connect($dsn)');
if (DB ::isConnection ($this->db)) {
if (DB ::isConnection ($dsn)) {
$db = & DB ::connect ($dsn);
$this->_testFatalAbort ($db, __FILE__ , __LINE__ );
function _numRows ($res) {
function _isDBError ($err) {
if (!DB ::isError ($err)) {
return $this->db->quoteSmart ($str);
return $this->db->quote ($str);
// {{{ _quoteIdentifier()
function _quoteIdentifier ($str) {
return $this->db->quoteIdentifier ($str);
return $this->_quote ($str);
function _dropSequence ($sequence) {
function _nextId ($sequence) {
return $this->db->nextId ($sequence);
return $this->db->getAll ($sql, null , DB_FETCHMODE_ASSOC );
function _db_Disconnect () {
$this->_debugMessage ('_db_Disconnect()');
@$this->db->disconnect ();
Documentation generated on Mon, 11 Mar 2019 10:14:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|