Select query by REGEXP error

Hi,

When i try to execute a query using the mysql regexp, i get this error:

Phalcon\Mvc\Model\Exception: Syntax error, unexpected token IDENTIFIER(regexp), near to ' "^:name:"', when parsing: SELECT * FROM Model WHERE name regexp "^:name:" (79)

I have tried with Model::find(" name REGEXP '^bla' ") and also with PHQL. Any ideas ?

PhalconPHP 1.3.0.



35.1k

It is not a bug. It is something that would be nice to have. Not all builtin functions of a DB system are supported by the ORM. Use raw sql instead.