lundi 8 juin 2015

Sqlite Python display table at once

I've made a small database program in Python using SQLite. My goal is to display all my entries that are in my table. I'm able to make that happen, but I have to hit Enter each time.

elif selection == '2': 
  print "Opened database successfully \n"
  cursor = conn.execute("SELECT * FROM DATABASE")
  all = cursor.fetchall()
  for row in all:
    print "ID = ", row[0], "NAME = ", row[1],  "CHECKED IN = ",  row[2], "\n"
    raw_input()

Is there a way I can display them all at once?

I have tired to remove the raw_input but all that does is goes back to my menu.

Aucun commentaire:

Enregistrer un commentaire