Yes, but then you'll be unncessarily altering valid data.
$str = str_replace("'", "", $str);
The one I use:
Data to database:
function prepIn($str) {
if (get_magic_quotes_gpc() == 0) {
return addslashes($str);
}
return $str;
}
I think the data coming from the database shouldnt be escaped, but I still use stripslashes() on it.