title: How could I make a fullname search work with a seperate last and firstname?
body: <p>I'm new to SQL and I'm trying to make a basic query work.</p>
  <p>This is the table and it's layout that I'm trying to search against:
  <a href="https://i.stack.imgur.com/A40Xt.png" rel="nofollow noreferrer">https://prnt.sc/20wj54g</a></p>
  <p>What I'm aiming to do is have a search term input, then have the input be used to search for names in the database by fullname.</p>
  <p>This is the current query I have now:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT *
  FROM personnel p
  LEFT JOIN department d ON (d.id = p.departmentID)
  LEFT JOIN location l ON (l.id = d.locationID)
  WHERE p.firstName LIKE '%Robert Heffron%' OR p.lastName LIKE '%Robert Heffron%';
  </code></pre>
  <p>This doesn't work as there is no last or firstname which contains the whole string &quot;Robert Heffron&quot; however this means if the user typed in that string looking for that person by the full name they wouldn't find them.</p>
  <p>I'm currently using PHP and JS to display the data but I'm struggling with the SQL part.
  If anyone could help I'd be very grateful.</p>