Source for file MDB2.php
Documentation is available at MDB2.php
// +----------------------------------------------------------------------+
// | PEAR :: DB_NestedSet_MDB2 |
// +----------------------------------------------------------------------+
// | 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: Lorenzo Alberton <l dot alberton at quipo dot it> |
// +----------------------------------------------------------------------+
// $Id: MDB2.php 204845 2006-01-08 21:52:24Z datenpunk $
* Wrapper class for PEAR::MDB2
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @version $Revision: 204845 $
* @var object The MDB2 object
* @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_MDB2($dsn, $params = array())');
$this->DB_NestedSet ($params);
$this->db = & $this->_db_Connect ($dsn);
$this->db->setFetchMode (MDB2_FETCHMODE_ASSOC );
$this->_debugMessage ('_DB_NestedSet_MDB2()');
* @return object DB The database object
function &_db_Connect (&$dsn)
$this->_debugMessage ('_db_Connect($dsn)');
$db = & MDB2 ::connect ($dsn);
$this->_testFatalAbort ($db, __FILE__ , __LINE__ );
return $this->db->query ($sql);
function _isDBError ($err)
if (!MDB2 ::isError ($err)) {
* @param string $sequence sequence name
function _nextId ($sequence)
return $this->db->nextId ($sequence);
* @param string $sequence sequence name
function _dropSequence ($sequence)
$this->db->loadModule ('Manager');
return $this->db->manager ->dropSequence ($sequence);
* @param string $sql SQL query
return $this->db->queryOne ($sql);
* @param string $sql SQL query
return $this->db->queryAll ($sql, null , MDB2_FETCHMODE_ASSOC );
* @param object db resource
* @param string $str string to be quoted
return $this->db->quote ($str, 'text');
// {{{ _quoteIdentifier()
* Unsupported! Will work as soon as MDB supports quoteIdentifier()
* @param string $sql SQL query
function _quoteIdentifier ($str)
return $this->db->quoteIdentifier ($str, false );
function _db_Disconnect ()
$this->_debugMessage ('_db_Disconnect()');
@$this->db->disconnect ();
Documentation generated on Mon, 11 Mar 2019 15:37:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|