Adapters/BaseDBAdapter.php
protected function escapeSqlName($value) {
        if (is_array($value)) {
            $res = '';
            foreach($value as $val) $res .= $this->escapeSqlName($val).',';
            return substr($res, 0, -1);
        }
        $chk_chars = array('.', '(', ' ');
        foreach($chk_chars as $chr) {
            if (strpos($value, $chr) !== false) {
                return $value;
            }
        }
        return '`'.$value.'`';
    }
protected function escapeSqlName($value) {
        if (is_array($value)) {
            $res = '';
            foreach($value as $val) $res .= $this->escapeSqlName($val).',';
            return substr($res, 0, -1);
        }
        $chk_chars = array('.', '(', ' ');
        foreach($chk_chars as $chr) {
            if (strpos($value, $chr) !== false) {
                return $value;
            }
        }
        return '`'.$value.'`';
    }
Escape identifiers
@param $value
@return string