I
I
Ilkhomjon Matazimov2020-05-12 18:28:14
MySQL
Ilkhomjon Matazimov, 2020-05-12 18:28:14

How to output a normal string with a select in mysql?

Good day.

I have this code (example):

cursor.execute("select vk_user_id from users where telegram_user_id = " + str(message.from_user.id))
result_vk_user_id = cursor.fetchall()
print(result_vk_user_id)


Such a select outputs this nonsense:
[(323826602,)]

How can this be converted into a normal string so that it looks like this: 323826602?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zexer, 2020-05-12
@mr_qpdb

https://stackoverflow.com/questions/12867140/pytho...
https://stackoverflow.com/questions/14861162/curso...
https://stackoverflow.com/questions/35300200/pytho...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question