title: Database - the best way, how to search names
body: <p>I am solving in these days following situation:
  In my DB table I have columns for name and surname.</p>
  
  <p>On my page I have input for searching people, and I am struggling with a problem, how to search the name in database that is stored in two columns and I have the name as string (<code>"Joe Green"</code>).</p>
  
  <p>For example, in database I have followings:</p>
  
  <pre><code>Joe New
  Joe Blue
  Joe Green
  Joe Francois Green
  </code></pre>
  
  <p>What could be the best way, how this problem to solve? I am currently working with MySQL database and Rails 3.</p>
  
  <p>EDIT: Thank you guys for you replies, <strong>but I don't know, how to make the query in Rails 3 notation, is it possible to use "concat"?</strong></p>