I want to do something like this
INSERT INTO link_list(link, status, hash_type, hash_id)
VALUES(@link, @status, @hash_type, @hash_id);
INSERT INTO active_dl(fileId, orderNo)
VALUES(last_insert_rowid(), SELECT COUNT(*) FROM active_dl);
But obviously it is wrong and theres a syntax error on select. How do i write this? Using sqlite.