switch wp_posts.post_name and wp_posts.ID around so column selects ID not title
typo