Python MySQL AttributeError: 'function' object has no ...
stackoverflow.com › questions › 64500669Oct 23, 2020 · AttributeError: 'function' object has no attribute 'execute' My code is: import mysql.connector as sqltor mycon=sqltor.connect(host="localhost",user="root",passwd=" ",database="revision") if mycon.is_connected(): print("Successfully Connected to MySQL database.") else: print("Check yo inputs, they really correct?") cursor=mycon.cursor cursor.execute("select*from account")
AttributeError: 'function' object has no attribute 'execute'
www.experts-exchange.com › questions › 27800359Jul 21, 2012 · def run(self): f =open("sf/ipaddress.txt","r") self.ip = f.readline() # reads the lines f.close() try: conn = lite.connect("sf/TransferData.sqlite") c = conn.cursor() c.execute('select * from ptrecords') for rows in c: password="sddd" Actual_Incident_number=rows[0] Incident_number = rows[1] Last_Name = rows[2] First_Name = rows[3] Age= rows[4] Gender = rows[5] Address = rows[6] City= rows[7] State = rows[8] Zip = rows[9] Ailment = rows[10] Treatment =rows[11] Patient_reprt=rows[12] Initial ...