title: Search a string in multiple fields of a table
body: <p>I have a table <strong>User</strong> which has the fields <strong>(id, first_name, middle_name, last_name).</strong></p>
  
  <p>I want to write a query to find a user by his name. The name may be first name, middle name or last name.</p>
  
  <pre><code>$sql = "SELECT * FROM user 
          WHERE first_name like '%$name%' OR  
                middle_name like '%$name%' OR
                last_name like '%$name%'";
  </code></pre>
  
  <p>Is it efficient query?
  (Leave the security issue for the time being.) </p>