title: Python: ValueError: unsupported format character ''' (0x27) at index 1
body: <p>I'm trying to execute a query to search 3 tables in a database using MySQL through Python. Every time I try and execute the following string as a query, it gives me an error about concatenation in the string.</p>
  
  <pre><code>"SELECT fileid FROM files WHERE description LIKE '%" + search + "%' OR filename LIKE '%" + search + "%' OR uploader LIKE '%" + search + "%' ORDER BY fileid DESC"
  </code></pre>
  
  <p>This is the error it gives me:</p>
  
  <pre><code>ValueError: unsupported format character ''' (0x27) at index 1
  </code></pre>
  
  <p>If I remove the character it asks for then I have to also remove the %, which stops the query from actually working properly. What can I do to fix this, since I'm rather new to Python.</p>
  
  <p>Thanks,
  Kris</p>