syntax error: update table_thread SET viewed=1 where id=