I
I
Ikace2022-03-25 19:55:11
Python
Ikace, 2022-03-25 19:55:11

Database cart in telegram bot?

Good afternoon, I am writing a telegram bot for the restaurant chain where I work. I have
been developing for a maximum of a month and this is such a project to test myself. I
learned how to add and extract data from a table
.
I don’t understand how to implement the basket I
know that you need to create a table that will act as a basket, but I don’t know how to transfer what the user selects into it and after displaying I don’t understand
If you give a simple example, I will be grateful then I’ll figure it out

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2022-03-25
@Vindicar

Well, if there is an actual table of goods, then the cart will be a table of the form "User ID - Product ID - Quantity". Then, when choosing a product, enter the ID of the user who sent the message. Well, to show the user's cart, just filter by the user ID from which the request came.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question