Subversion Repositories PHPX

Compare Revisions

Last modification

Ignore whitespace Rev 31 → Rev 32

/trunk/Db/MySQLDB.php
33,6 → 33,18
*/
protected $_charset = null;
/**
* (non-PHPdoc)
* @see Database::_leftQuote
*/
protected $_leftQuote = '`';
/**
* (non-PHPdoc)
* @see Database::_rightQuote
*/
protected $_rightQuote = '`';
public function __construct()
{
$this->_dsn = "mysql:host={$this->_host}"
46,40 → 58,4
parent::__construct();
}
/**
* Escapes a database name so that it can be used in a query.
*
* @param string $name
* The name to be escaped
* @return string
* The escaped name
*/
public function escapeName($name)
{
return '`' . $name . '`';
}
 
/**
* (non-PHPdoc)
* @see Database::_escapeAliasArray()
*/
protected function _escapeAliasArray(array &$array)
{
foreach ($array as $column => &$value)
{
$value = $value . ' AS `' . $column . '`';
}
return $array;
}
 
/**
* (non-PHPdoc)
* @see Database::_escapeValueArray()
*/
protected function _escapeValueArray(array &$array, $suffix = '', array &$escape = array('`', '`'))
{
return parent::_escapeValueArray($array, $suffix, $escape);
}
}