Correct sql statements for editing a post.