I am basically having issues with the syntax and can't find much information anywhere. I have two tables. Category_tb and Information_tb.
Category_tb Has column of category_name(text). Information_tb Has title(text) and category_id(INTEGER)
I am not using the foreign key I am using ROWID of Category_tb. Here are the SQL quires. Basically I am having a problem with the insertion of data into Information_tb using Category_tb.ROWID as a foreign key.
title = 'Some title'
categories = 'Crime'
self.curr.execute("""
insert into information_tb values (?,?)""",(
[title],
["""select ROWID from Category_tb where Category_tb.category_name = [categories] """]
))
Any help would be appreciated. Thanks in advance.