app/code/community/Adyen/Payment/Model/Resource/Billing/Agreement/Collection.php
public function addNameToSelect()
    {
        $fields = $this->_getNameFields();
        $adapter = $this->getConnection();
        $concatenate = array();

        if (isset($fields['prefix'])) {
            $concatenate[] = $adapter->getCheckSql(
                '{{prefix}} IS NOT NULL AND {{prefix}} != \'\'',
                $adapter->getConcatSql(array('LTRIM(RTRIM({{prefix}}))', '\' \'')),
                '\'\''
            );
        }

        $concatenate[] = 'LTRIM(RTRIM({{firstname}}))';
        $concatenate[] = '\' \'';
        if (isset($fields['middlename'])) {
            $concatenate[] = $adapter->getCheckSql(
                '{{middlename}} IS NOT NULL AND {{middlename}} != \'\'',
                $adapter->getConcatSql(array('LTRIM(RTRIM({{middlename}}))', '\' \'')),
                '\'\''
            );
        }

        $concatenate[] = 'LTRIM(RTRIM({{lastname}}))';
        if (isset($fields['suffix'])) {
            $concatenate[] = $adapter
                ->getCheckSql(
                    '{{suffix}} IS NOT NULL AND {{suffix}} != \'\'',
                    $adapter->getConcatSql(array('\' \'', 'LTRIM(RTRIM({{suffix}}))')),
                    '\'\''
                );
        }

        $nameExpr = $adapter->getConcatSql($concatenate);


        $this->addExpressionFieldToSelect('name', $nameExpr, $fields);

        return $this;
    }
public function addNameToSelect()
    {
        $fields = $this->_getNameFields();
        $adapter = $this->getConnection();
        $concatenate = array();

        if (isset($fields['prefix'])) {
            $concatenate[] = $adapter->getCheckSql(
                '{{prefix}} IS NOT NULL AND {{prefix}} != \'\'',
                $adapter->getConcatSql(array('LTRIM(RTRIM({{prefix}}))', '\' \'')),
                '\'\''
            );
        }

        $concatenate[] = 'LTRIM(RTRIM({{firstname}}))';
        $concatenate[] = '\' \'';
        if (isset($fields['middlename'])) {
            $concatenate[] = $adapter->getCheckSql(
                '{{middlename}} IS NOT NULL AND {{middlename}} != \'\'',
                $adapter->getConcatSql(array('LTRIM(RTRIM({{middlename}}))', '\' \'')),
                '\'\''
            );
        }

        $concatenate[] = 'LTRIM(RTRIM({{lastname}}))';
        if (isset($fields['suffix'])) {
            $concatenate[] = $adapter
                ->getCheckSql(
                    '{{suffix}} IS NOT NULL AND {{suffix}} != \'\'',
                    $adapter->getConcatSql(array('\' \'', 'LTRIM(RTRIM({{suffix}}))')),
                    '\'\''
                );
        }

        $nameExpr = $adapter->getConcatSql($concatenate);


        $this->addExpressionFieldToSelect('name', $nameExpr, $fields);

        return $this;
    }
public function addNameToSelect ( ) { $ fields = $ this -> _getNameFields ( ) ; $ adapter = $ this -> getConnection ( ) ; $ concatenate = array ( ) ; if ( isset ( $ fields [ 'prefix' ] ) ) { $ concatenate [ ] = $ adapter -> getCheckSql ( '{{prefix}} IS NOT NULL AND {{prefix}} != \'\'' , $ adapter -> getConcatSql ( array ( 'LTRIM(RTRIM({{prefix}}))' , '\' \'' ) ) , '\'\'' ) ; } $ concatenate [ ] = 'LTRIM(RTRIM({{firstname}}))' ; $ concatenate [ ] = '\' \'' ; if ( isset ( $ fields [ 'middlename' ] ) ) { $ concatenate [ ] = $ adapter -> getCheckSql ( '{{middlename}} IS NOT NULL AND {{middlename}} != \'\'' , $ adapter -> getConcatSql ( array ( 'LTRIM(RTRIM({{middlename}}))' , '\' \'' ) ) , '\'\'' ) ; } $ concatenate [ ] = 'LTRIM(RTRIM({{lastname}}))' ; if ( isset ( $ fields [ 'suffix' ] ) ) { $ concatenate [ ] = $ adapter -> getCheckSql ( '{{suffix}} IS NOT NULL AND {{suffix}} != \'\'' , $ adapter -> getConcatSql ( array ( '\' \'' , 'LTRIM(RTRIM({{suffix}}))' ) ) , '\'\'' ) ; } $ nameExpr = $ adapter -> getConcatSql ( $ concatenate ) ; $ this -> addExpressionFieldToSelect ( 'name' , $ nameExpr , $ fields ) ; return $ this ; }
Add Name to select

@return Mage_Customer_Model_Resource_Customer_Collection
Add Name to select