I am trying to return a numeric value from this statement:
c = db.execute("""SELECT *, rowid FROM members WHERE barcode = '%s' AND debit > 0 LIMIT 50""" % (s,))
But I get this as the returned value:
sqlite3.Cursor object at 0xb6cb2720
What should I do with this cursor object to get the results?
c?for row in c: ...To retrieve data after executing a SELECT statement, you can either treat the cursor as an iterator, call the cursor’s fetchone() method to retrieve a single matching row, or call fetchall() to get a list of the matching rows.