Hi, a need help, please

$data = $this->getEntityManager()->createQuery(
                    'SELECT p.name as cliente, 
                    ( 
                    SELECT sum(cf1.price)
                    FROM Backoffice\Entity\CashFlows cf1 
                    WHERE cf1.personAccounts = pa.id and cf1.type = 1
                    )as disponvel,


                    ( 
                    SELECT sum(cf2.price)
                    FROM Backoffice\Entity\CashFlows cf2 
                    INNER JOIN Backoffice\Entity\AdmCashFlows acf2 WITH 
acf2.id = cf2.admCashFlows 
                    WHERE cf2.personAccounts = pa.id and cf2.type = 2 AND 
acf2.active = 1
                    )as bloqueado,


                    (SELECT sum(cf3.price)
                    FROM Backoffice\Entity\CashFlows cf3 
                    WHERE cf3.personAccounts = pa.id and cf3.type = 1 
                    )+(
                    SELECT sum(cf4.price)
                    FROM Backoffice\Entity\CashFlows cf4
                    INNER JOIN Backoffice\Entity\AdmCashFlows acf4 WITH 
acf4.id = cf4.admCashFlows 
                    WHERE cf4.personAccounts = pa.id and cf4.type = 2 AND 
acf4.active = 1
                    ) as total


                    FROM Backoffice\Entity\Persons p 
                    INNER JOIN Backoffice\Entity\PersonAccounts pa WITH 
p.id = pa.person


                    ORDER BY p.name'
                    );
        //echo 'sql: '.print_r($data->getDQL()).'<br>'."\n\t";
        return $data->getResult();   

Doctrine\ORM\Query\QueryExceptionFile:

/Users/rcampagnoli/Sites/xxxxxx/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:52

Message:

[Syntax Error] line 0, col 663: Error: Expected 
Doctrine\ORM\Query\Lexer::T_FROM, got '+'


tanks

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to