public function buildRealTableName($table, $include_dbname=true)
    {
        $table = explode(' ', $table)[0];
        $table = str_replace('#', '.', $table);
        if (($pos = strpos($table, '.')) !== false) {
            $database = substr($table, 0, $pos);
            $table = substr($table, $pos+1);
        } elseif ($prefix = $this->getTablePrefix()) {
            $database = $this->getDatabase();
            $table = strpos($table, $prefix) === 0 ? $table : $prefix . $table;
        }
        
        return $include_dbname && $database ? $database . '.' . $table : $table;
    }
public function buildRealTableName($table, $include_dbname=true)
    {
        $table = explode(' ', $table)[0];
        $table = str_replace('#', '.', $table);
        if (($pos = strpos($table, '.')) !== false) {
            $database = substr($table, 0, $pos);
            $table = substr($table, $pos+1);
        } elseif ($prefix = $this->getTablePrefix()) {
            $database = $this->getDatabase();
            $table = strpos($table, $prefix) === 0 ? $table : $prefix . $table;
        }
        
        return $include_dbname && $database ? $database . '.' . $table : $table;
    }
public function buildRealTableName ( $ table , $ include_dbname = true ) { $ table = explode ( ' ' , $ table ) [ 0 ] ; $ table = str_replace ( '#' , '.' , $ table ) ; if ( ( $ pos = strpos ( $ table , '.' ) ) !== false ) { $ database = substr ( $ table , 0 , $ pos ) ; $ table = substr ( $ table , $ pos + 1 ) ; } elseif ( $ prefix = $ this -> getTablePrefix ( ) ) { $ database = $ this -> getDatabase ( ) ; $ table = strpos ( $ table , $ prefix ) === 0 ? $ table : $ prefix . $ table ; } return $ include_dbname && $ database ? $ database . '.' . $ table : $ table ; }
build real table name, like database.tablePrefix + tableName
@param  string  $table_name if begin '#' or '.' don't add prefix
@param  boolean $include_dbname
@return string
build real table name like database . tablePrefix + tableName