1

I have this actual code

public function findCode($code_received)
{

    $pellicules =
            $this->createQueryBuilder()
            ->field('code_base')->equals($code_received)
            ->getQuery()
            ;

}

But sometimes my code received is inside my code_base, for example:

Code_received = Abata

Code_base = Abata23xiub

I tried to use the in instead of equals but I'm not having success. How could I do it?

Community
  • 1
  • 1
Matheus Oliveira
  • 587
  • 3
  • 10
  • 33
  • 1
    Possible duplicate of [How to query mongodb with condition “like” in symfony2](http://stackoverflow.com/questions/16029684/how-to-query-mongodb-with-condition-like-in-symfony2) – Gerry Dec 06 '16 at 13:45
  • Possible duplicate of [How to query MongoDB with "like"?](https://stackoverflow.com/questions/3305561/how-to-query-mongodb-with-like) – Tom Tom Jul 23 '17 at 15:05

0 Answers0