Hello,
I want to test whether DQL supports this syntax : ROUND(NOW(), 'YEAR')
(MySQL does). Here is what I tried in MySQL console:
mysql> SELECT ROUND(NOW(), 'YEAR');
+----------------------+
| ROUND(NOW(), 'YEAR') |
+----------------------+
| 20100923135639 |
+----------------------+
Trying the same thing in DQL gives this:
techosaure :( \>~/workspace/carel ./symfony doctrine:dql --show-sql "Select ROUND(NOW(),'YEAR')";
>> doctrine executing dql query
DQL: Select ROUND(NOW(),'YEAR')
PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in /opt/symfony-1.4.6/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Tokenizer.php on line 352
How can I test a function in DQL without using a FROM clause?