is there an alternative to using mysql_real_escape_string for the ' character

i dont want to use it anymore, so i was wondering if there is another way