function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ales.pales.p 

LIKE operator in a rerender DataTable action

I would like to implement a simple contact search with VisualForce and I didn't find syntax documentation about query LIKE operator.
Actually I created 3 objects: 1 simple "inputText", 1 "commandButton" and 1 "dataTable" for search contacts results.
 
Users should insert a search key in the inputText field, press the commandButton and obtain a list (dataTable) of contacts that matches the search key.
Actually it works fine with a "=" operator but I would like to extend this search with a LIKE operator.
 
  String searchKey = 'Josh Davis';
  public List<Contact> getMyContacts() {
    return [SELECT Id, Name, Account.Name, Phone FROM Contact
            WHERE Name = :searchKey
            ORDER BY Name];
  }
How to do that?
Thanks a lot.