title: Python MySQLdb issues (TypeError: %d format: a number is required, not str)
body: <p>I am trying  to do the following insert operation:</p>
  
  <pre><code>cursor.execute("""
                      insert into tree (id,parent_id,level,description,code,start,end)
                      values (%d,%d,%d,%s,%s,%f,%f)
                      """, (1,1,1,'abc','def',1,1)
                      )
  </code></pre>
  
  <p>The structure of my MYSQL table is:</p>
  
  <pre><code>id int(255),
  parent_id int(255),
  level int(11),
  description varchar(255),
  code varchar(255),
  start decimal(25,4),
  end decimal(25,4)
  </code></pre>
  
  <p>However when I run my program, I get the error </p>
  
  <blockquote>
    <p>"  File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 151, in execute
        query = query % db.literal(args)</p>
    
    <p>TypeError: %d format: a number is required, not str"</p>
  </blockquote>