Announcement

Collapse
No announcement yet.

How to make LIKE search by phone from a contact in ORM

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to make LIKE search by phone from a contact in ORM

    https://github.com/espocrm/documenta...lopment/orm.md
    Hello, tell me how to do a LIKE search by phone from a contact in ORM?

    $contactList = $entityManager->getRepository('Contact')->where(array('LIKE' => 'contact.phoneNumber LIKE "%88888888"'))->limit(0, 200)->find();

    So does not find

  • #2
    Hello
    you need to use
    PHP Code:
    $contactList $entityManager->getRepository('Contact')->where(['phoneNumber*' => "%8%"])->limit(0200)->find(); 

    Comment


    • #3
      Many thanks!!!!!!!!!!!!!!!

      Comment


      • #4
        You will need the php code in the backend.
        $contactList = $entityManager->getRepository('Contact')->where(['phoneNumber*' => "%8%"])->limit(0, 200)->find();

        Comment

        Working...
        X