What you want to do is insert the data in the database with the ' replaced with '' . This escapes the apostrophe and won't mess up the query.
Some results have been hidden because they may be inaccessible to you
Show inaccessible resultsSome results have been hidden because they may be inaccessible to you
Show inaccessible results