Share tinydb via Whatsapp

well done... if it is working it is a valid solution...
keep up the good work...
Taifun

Ok thank you!

i have also added the sharing function of the listid: (later i will add a random number in label listid)

i have a question:
if i click 2 or more times the writesql button the list will be inserted 2/n times

is there a way to check if listid is still present in database do UPDATE if not INSERT query?

Taifun

Thx! i knew che insert ignore command but i don't know why I have not thought about it!!
does the JOB

no it doesn't solve my problem!

because if i resend the query with insert ignore or replace query it will add same items a second time

sorry maybe i didn't explain in clear way what i want to achieve...

is if listid is present in database to send an UPDATE query so will be re-written the same row and will not be added another item
if it is not present do a simple INSERT query?

I was thinking to send before a
DELETE FROM table_name
WHERE listd = 'valueoflistid'

Then the insert query

the link I previously mentioned is talking about several solutions...
so what about using the INSERT ... ON DUPLICATE KEY UPDATE Statement
https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html

Taifun

1 Like

After that i shared something on whatsapp/telegram/email is it possible to come back to my app??

1 Like

Only if the app allows that feature. I know that Whatsapp and Email can't allow that. I've never used Telegram.