Hi,

I'm doing a SELECT where I do a MAX() on a field, but the values
starting with 2 letters must have priority on other values. To achieve
this, I do in pure SQL :

SELECT *, MAX(CONCAT(field RLIKE '^[A-Za-z]{2}', field)) FROM table;

Which works very well.

Now, when I try this in doctrine :

$this->createQuery('n')->select('n.*, max(concat(n.fieldLIKE \'^[A-Za-
z]{2}\', n.field))')->execute();

I got an exception:

Doctrine_Query_Exception
Unknown aggregate alias: RLIKE

So, my question is, is it possible at all to use RLIKE in a Doctrine
query ? How can I achieve my goal ?
I tried with a Doctrine_RawSql object as well, but got the same
result.
I'm using symfony 1.2.9.

Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to