Answer the question
In order to leave comments, you need to log in
How to output multiple values to SQIite3 and Python table?
How to output multiple values to SQIite3 and Python table?
Let's say a user has created 5 tables, with different text, each of them has his telegram_id assigned to it.
It is necessary to display all 5 values in his 5 tables
Answer the question
In order to leave comments, you need to log in
To take and learn the basics of SQL, it’s already tired of repeating, it’s probably you who produce here like this with such questions.
You can make multiple requests, parse them (that is, process them in a Python script), and compose them into one result.
You can combine query results across multiple tables using SQL JOIN, the key will be telegram_id . Just in case, see the sqlite instructions, there may be slight differences from the sql syntax
Too abstract question
Well, read about SQL queries and form a query like this:
SELECT t1.telegram_id, t1.text, t2.text, t3.text, t4.text, t5.text
FROM first_table AS t1
LEFT JOIN second_table AS t2
ON t2.telegram_id = t1.telegram_id
LEFT JOIN third_table AS t3
ON t3.telegram_id = t1.telegram_id
LEFT JOIN forth_table AS t4
ON t4.telegram_id = t1.telegram_id
LEFT JOIN fifth_table AS t5
ON t5.telegram_id = t1.telegram_id
WHERE t1.telegram_id=<какой-то ID>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question