I have names like O'Brien and O'Keefe that I need to save in my MySQL database but it throws up an error because of the "'".

How can I over come this as I don't want to save name like OBrien and OKeefe?

Thanks.