mysql_real_escape_string and addslashes are both used to escape data before the database query, so what\'s the difference? (This question is not ab
mysql_real_escape_string
addslashes
It seems that mysql_real_escape_string is binary-safe - the documentation states:
If binary data is to be inserted, this function must be used.
I think it's probably safer to always use mysql_real_escape_string than addslashes.