K
K
Konstantin Ermolaev2021-04-02 09:24:21
Python
Konstantin Ermolaev, 2021-04-02 09:24:21

How to output SQLite3 DB row number as a variable?

I am writing a program based on the tkinter graphics library. My form/interface has an entry widget (Entry). Enter a three-digit integer in this field that matches one of the values ​​in the first column "Garage number" in the SQLite3 database table. The table has two more columns: "Name" and "Other data" .

6066b754b3cc3738781264.png
6066b80238ccf514322438.png

Purpose: to display in the form (and then use to write to a text file) the data from the two remaining columns (separately) "Name" and "Other data" corresponding to the entered value, that is, the value from "Garage number" .

Chosen method:Output as a variable the line number with the requested garage number, then output the Name and other data into the form using the already known coordinates (and then use this data further to output to a text file).

Questions:

1. How to display "Garage number" as a variable value?

2. Is the method chosen correctly or are there more efficient ways?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-04-02
@Lomonos1917

Here I wrote for someone an example on the tkinter of working with sqlite. All the CRUD
you need is there . That is, methods for entering data and receiving) well, and display

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question