Jan-12-2019, 05:59 PM
Please use Python tags when posting code. It makes the post more readable.
Once executed, the data is stored in the cursor object. To fetch it, you need to call either the fetchone() method or the fetchall() method:
Once executed, the data is stored in the cursor object. To fetch it, you need to call either the fetchone() method or the fetchall() method:
computeNetPay(conn, ppeDate, intEmpID, intCmpID) ppeDate = datetime(2019,2,23,0,0,0) intEmpID = 1 intCmpID = 2 SQL = "SELECT * FROM Programs WHERE PPE_Date = '%s' AND EmployeeID = '%s' AND CompanyID = '%s'" % (ppeDate, intEmpID, intCmpID) print (SQL) cur = conn.cursor cur.execute(SQL) print(cur.fetchall())