title: Search for keywords from a string using sqlite and python
body: <p>I have a search box where some text can be entered and results from a database are returned, for example, if I was to search for 'John Smith' the record for all the John Smiths would appear.</p>
  
  <p>However, I would like to make the search less specific, as in if I was to just search for 'John' that record would appear.</p>
  
  <p><strong>This is my query:</strong></p>
  
  <pre><code>cur = g.db.execute('SELECT name, id, location, education FROM accounts WHERE email=? COLLATE NOCASE OR name=? COLLATE NOCASE OR education=? COLLATE NOCASE', (query, query, query,))
  </code></pre>
  
  <p>As you can see, it also returns a search for not just 'name' but 'location' and 'education' too so I would like the keyword search to apply to these too.</p>
  
  <p>Thanks.</p>