T
T
TanderOFF2021-08-21 22:02:40
SQLite
TanderOFF, 2021-08-21 22:02:40

How to update data by column name?

Hello ! Is there any way to update the value by column name?
or at least by its row.keys

await db2.execute("UPDATE inv SET {} = {} - 1 WHERE id = {}".format(str(names[item]) , str(names[item]) , ctx.author.id))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HemulGM, 2021-08-21
@HemulGM

Can

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question