import MySQLdb db_local = MySQLdb.connect("localhost","root","root","luan_van") num = 41001662 with db_local: cur = db_local(MySQLdb.cursors.DictCursor) cur.execute("SELECT * FROM 192.168.1.7 WHERE Card_ID = '%d'" %num) rows = cur.fetchall() ID = 0 for row in rows: ID = row['Card_ID'] print ID
cur.execute("SELECT * FROM [192.168.1.7] WHERE Card_ID = '%d'" %num)
`
`192.168.1.7`
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)