Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBAL-534: RLIKE #1741

Closed
doctrinebot opened this issue May 29, 2013 · 3 comments
Closed

DBAL-534: RLIKE #1741

doctrinebot opened this issue May 29, 2013 · 3 comments
Assignees
Labels

Comments

@doctrinebot
Copy link

Jira issue originally created by user pcastrotigre:

I am trying to use RLIKE in my query but I am getting an error.

This is how I am trying to retrieve my data:

$query = $this->em->createQuery("
        SELECT p 
        FROM User p 
        WHERE p.firstName RLIKE :param ");
$query->setParameter("param", $param);

And this is the error I am getting:

Error: Expected =, <, <=, <>, >, >=, !=, got 'RLIKE' 

How should I use the RLIKE?

Thanks.

@doctrinebot
Copy link
Author

Comment created by @Ocramius:

RLIKE is not supported by the ORM - you may want to implement a custom DQL function as described in http://www.doctrine-project.org/blog/doctrine2-custom-dql-udfs.html

You may also find a list of available implementations of various MySQL specific DQL functions at https://github.com/beberlei/DoctrineExtensions/tree/master/lib/DoctrineExtensions/Query/Mysql

@doctrinebot
Copy link
Author

Issue was closed with resolution "Invalid"

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants