Reputation: 4650
I'm using Symfony2 and I get an error:
[Syntax Error] line 0, col 70: Error: Expected =, <, <=, <>, >, >=, !=, got 'AND'
when I click on the button in the toolbar to see the queries it says that they are 4, but I see only 3 of them and there is nothing containing 'AND'. My question is where I can find this line 0, col 70 and how can I see the wrong query in order to be able to fix it?
Upvotes: 0
Views: 707
Reputation: 11374
You should be able to figure out the place where error happens basing on symfony exception backtrace.
For see what sql has been executed just after you create your query, you can use getSQL() method on Query object.
For query builder:
$sqlString = $qb->methodsToCreateQuery()
->getQuery()
->getSQL;
or for DQL:
$sqlString = $em->createQuery("some DQL query")->getSQL();
Upvotes: 1