how to build a query so that id user_id = 19 page value from tmp table where user_id = 19
... c.execute('SELECT * FROM Сontent WHERE id = # ? ') If I understand correctly, there are 2 tables:
Then the query is:
SELECT * FROM my_table join tmp on my_table.id = tmp.page WHERE tmp.user_id = 19 For example:
select * from tmp, Content where Content.id=tmp.page and user_id=19; Source: https://ru.stackoverflow.com/questions/518893/
All Articles