Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def vertablaentera():
- tabla=cajan.get()
- while tabla!="familia" and tabla!="telefonos":
- tkMessageBox.showerror("Administrador","La tabla introducida es erronea")
- cajan.delete(0,END)
- break
- if tabla=="familia":
- cursor.execute("SELECT * FROM familia")
- verRegistros=cursor.fetchone()
- #la linea anterior utiliza fetchone y no fetchall porque el bucle de abajo recorre uno a uno los registros
- if not verRegistros:
- tkMessageBox.showinfo("Administrador","No existen datos")
- else:
- #tkMessageBox.showinfo("INFORMACIO SOLICITADA",verRegistros)
- id=0
- for row in cursor:
- tabla1.insert("",index="end",text=str(id),value=(row[1],row[2],row[3]))
- id+=1
Add Comment
Please, Sign In to add comment