Python Forum
Thread Rating:
  • 4 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Working
#2
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:

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())
Reply


Messages In This Thread
Not Working - by gcryall - Jan-12-2019, 04:47 PM
RE: Not Working - by stullis - Jan-12-2019, 05:59 PM
RE: Not Working - by gcryall - Jan-12-2019, 07:44 PM
RE: Not Working - by stullis - Jan-12-2019, 08:28 PM
RE: Not Working - by gcryall - Jan-12-2019, 10:48 PM
RE: Not Working - by stullis - Jan-12-2019, 11:35 PM
RE: Not Working - by gcryall - Jan-13-2019, 01:44 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020