title: ValueError("unsupported format character 'A' (0x41) at index 185",)
body: <p>I am trying to execute a query which lists certain values of my db that match the inputs of my html search form. I want it to do the search even if some of the form inputs are empty inputs.I am using Python 3.4  and my query is something like this:</p>
  
  <pre><code>query=("select DISTINCT val1,val2,val3,val4 from tab1,tab2 WHERE tab1.val1=tab2.val1 AND onoma LIKE '%' AND epitheto LIKE '%' AND (val4 between % AND %)" )
  data =(d1, d2, d3 ,d4)
  c.execute("SET NAMES utf8")   
  c.execute(query,data)
  </code></pre>
  
  <p>the error I get is this:</p>
  
  <pre><code>ValueError("unsupported format character 'A' (0x41) at index 185",)
  </code></pre>
  
  <p>Please, if you know how i can fix this, i would really appreciate it. I'm a begginer with databases.
  Thanks in advance</p>