I'm trying to create a support ticket system using flask. I am using sqlite3 for my database of tickets. I am trying to get all of the 'ids' of tickets with a status of 'pending' however when I run the said function it returns <sqlite3.Cursor object at 0x03746B20> is their anyway I can fetch all of the ids as an array of strings?
Function:
def GetPendingTickets():
opendb()
qry = "SELECT 'id' FROM 'tickets' WHERE 'Status'='Pending'"
connection.row_factory = lambda cursor, row: row[0]
openTickets = cursor.execute(qry)
closedb()
return openTickets
Thanks in advance!