title: Python MySQLdb TypeError: not all arguments converted during string formatting
body: <p>Upon running this script:</p>
  
  <pre><code>#! /usr/bin/env python
  import MySQLdb as mdb
  import sys    
  
  class Test:
      def check(self, search):
          try:
              con = mdb.connect('localhost', 'root', 'password', 'recordsdb');
  
              cur = con.cursor()
              cur.execute( "SELECT * FROM records WHERE email LIKE '%s'", search )
  
              ver = cur.fetchone()
  
              print "Output : %s " % ver
  
          except mdb.Error, e:
  
              print "Error %d: %s" % (e.args[0],e.args[1])
              sys.exit(1)
  
          finally:    
              if con:    
                  con.close()
  
  test = Test()
  test.check("test")
  </code></pre>
  
  <p>I get an error of:</p>
  
  <pre><code>./lookup 
  Traceback (most recent call last):
    File "./lookup", line 27, in &lt;module&gt;
      test.check("test")
    File "./lookup", line 11, in creep
      cur.execute( "SELECT * FROM records WHERE email LIKE '%s'", search )
    File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 187, in execute
      query = query % tuple([db.literal(item) for item in args])
  TypeError: not all arguments converted during string formatting
  </code></pre>
  
  <p>I have zero idea why. I'm trying to do parameterized querys, but it's been nothing but a pain. I'm somewhat new to Python, so it's probably an obvious problem.</p>