Database stuff. New table "thread". Changing "left join" to "inner join", removing "limit 1" at update and delete.