import time import MySQLdb var = 'AAAA' db = MySQLdb.connect(host="localhost", user="root", passwd="", db="db") cursor = db.cursor() sql = "select valore from tab where valore LIKE '%$var%' " number_of_rows = cursor.execute(sql) print(cursor.fetchone()) db.close()result: None
help, search in python mysql
help, search in python mysql
|
|
Users browsing this thread: 2 Guest(s)