I can't delete data multiple in mysql from python
<p><strong>I made input 2 value row and num when input data so program throw Rollback not work if-else and thank for help</strong></p>

<pre><code>#!/usr/bin/python
import mysql.connector
conn = mysql.connector.connect(host="",user="",passwd="",db="")
cursor = conn.cursor()
try:
        row = raw_input("InputNameRow : ")
        num = int(input("InputNumber 1-10 : "))
        if num &lt;= 10:
                sql1 = "SELECT * FROM dt WHERE '%s' = '%d' " %(row,num)
                cursor.execute(sql1)
                data = cursor.fetchall()
                print(data[0])
                sqlde = "DELETE FROM dt WHERE '%s' = '%d' " %(row,num)
                cursor.execute(sqlde, (num))
                print "DELETE SUCESS"
                conn.commit()
        else:
                print "Data Empty"
except:
        conn.rollback()
        print "Input Error"

conn.close()
</code></pre>

<p>Try :</p>

<pre><code>cursor.execute(sqlde)
</code></pre>

<p>instead of </p>

<pre><code>cursor.execute(sqlde, (num))
</code></pre>

python mysql