title: Laravel Concat - Syntax or Access Violation
body: <p>Trying to write an MySQL Query to search on users based on two columns :</p>
  
  <p><strong>first_name</strong></p>
  
  <p><strong>surname</strong></p>
  
  <p>I'd like to Concatenate first_name and surname as name and then write a search query based on that.</p>
  
  <p>I've currently written some PHP code, But I keep getting the error :</p>
  
  <blockquote>
    <p>SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
    error in your SQL syntax; check the manual that corresponds to your
    MariaDB server version for the right syntax to use near '%?%' at line
    1 (SQL: select <code>users</code>.* from <code>users</code> where CONCAT(<code>first_name</code>, ' ',
    <code>surname</code>) LIKE %Stu%)</p>
  </blockquote>
  
  <p>My current PHP code is as follows :</p>
  
  <pre><code>// Search Based on Q..
  $q = $request-&gt;input('q');
  
  $results = User::select('users.*')-&gt;WhereRaw("CONCAT(`first_name`, ' ', `surname`) LIKE %?%", [$q])-&gt;get();
  </code></pre>
  
  <p>I suspect I'm just getting the syntax wrong, But any help would be appreciated.</p>
  
  <p>Thank You!</p>