I am getting a little more involved with mysql and wanted to add a value to an existing value in a column.
I have already written the function for this. Previously I used the following function, but of course this no longer works with mysql, if I have seen correctly:
earnings = random.randrange(300)
My new function is therefore:
await cur.execute("UPDATE economy SET wallet=wallet + ROUND (1 + rand() *300) WHERE user=%s", (ctx.author.id,))
This part also works. But I would like to get the generated value from my ROUND (1 + rand() *300)
function and output it. Is this possible at all and if so: How?
About other functions or possibilities that show me a number at the end I would be grateful too!
Posts I have already looked at:
https://database.guide/mysql-rand-function-generate-a-random-number-in-mysql/