title: Searching with MySQL database and PHP
body: <p>I have a search page in PHP which i can enter a string to search.
  Also I have written a page which displays the results which matches with the string in the database.
  SQL query is </p>
  
  <pre><code>$query = "select * from table_name WHERE Name LIKE '$srch' || Last LIKE '$srch' || email LIKE '$srch' || comment LIKE '$srch'"; 
  </code></pre>
  
  <p>If the search string is "John David", I would like to show every record that contains
  either "John" or "David" rather than only showing results that have both "John David", since I have records like John Samuel,David Grecco, Jennifer Davidson etc</p>