V
V
Vlad2422022-03-22 13:45:14
Python
Vlad242, 2022-03-22 13:45:14

How to pull data from a cell?

I need to get the number of people in the queue. Here is my code and db

def get_count_people(self):
        return self.cursor.execute("SELECT COUNT (chat_id) FROM queue")


6239a8b6ede34209678357.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gnifajio, 2022-03-23
@gnifajio

I think so:

def get_count_people(self):
    self.cursor.execute("SELECT COUNT (chat_id) FROM queue")
    result = self.cursor.fetchall()
    return result

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question