title: MySQL Search Query on two different fields
body: <p>I need to search on two fields using LIKE function and should match also in reverse order. My table uses InnoDB which dont have Full text search.</p>
  
  <p>Consider the following case:</p>
  
  <p>I have users table with first_name and last_name column. On it, there is a row with the following value:</p>
  
  <pre><code>{
      first_name: 'Ludwig',
      last_name: 'van Beethoven',
  }
  </code></pre>
  
  <p>Cases:</p>
  
  <ol>
  <li>Can search "Ludwig van Beethoven"</li>
  <li>Can search "Beethoven Ludwig"</li>
  <li>Can search "Ludwig"</li>
  <li>Can search "Beethoven"</li>
  </ol>
  
  <p>I tried this SQL statement but no luck.</p>
  
  <pre><code>SELECT CONCAT(first_name, ' ', last_name) as fullname 
    FROM users 
   WHERE fullname LIKE '%Ludwig van Beethoven%';
  </code></pre>