Example:
<?php
$uid = 'Pat/r'ick';
$string = mysql_escape_string($uid);
$query = 'INSERT INTO user (uid) VALUES ($string)';
?>
After escaped the string, mysql insert value 'Pat//r/'ick' into the table. What I understand is mysql_escape_string is just to escape string so that the query can run without any issue then still should be able to save the original value of the string after escaped. In this case, I expect Mysql to save value 'Pat/r'ick' into the table.
Can someone help me how to save the original string after escaped the string in the query?