title: Search all the values in the searchQuerys list and get all the values that appear in the title or the content columns using Python and sqlite
body: <p>I need to search all the values in the searchQuerys list and get all the values that appear in the title or the content columns using Python and sqlite.</p>
  <p>searchQuerys= [&quot;apples&quot;, &quot;banana&quot;, &quot;fig&quot;]
  searchQuerys= [&quot;apples&quot;, &quot;banana&quot;]</p>
  <p>The following code works fine, but I don't like it and I feel it is prone to SQL injection. is there a way to enhance it?</p>
  <pre><code>selectStmt = &quot;select id, content, title from table where (content like '%&quot;+searchQuerys[0] +&quot;%' or title like '%&quot; + searchQuerys[0] + &quot;%')&quot;
              i=1
              while i &lt; len(searchQuerys):
                  selectStmt += &quot; and (content like '%&quot;+searchQuerys[i] +&quot;%' or title like '%&quot; + searchQuerys[i] + &quot;%')&quot;
                  i+=1
              print(selectStmt)
              res = conn.execute (selectStmt)
  </code></pre>