title: how to escape string before use in query
body: <p>how to escape this string </p>
  
  <pre><code>$sql = 'LOAD DATA LOCAL INFILE "C:\\xampp\\htdocs\\test\\import-excel\\book1.csv\\" INTO TABLE exam FIELDS TERMINATED BY  "," ';
  </code></pre>
  
  <p>because path to file will be a variable i don't know how to escape the path before use it in query , i used phpmyadmin ( create php code ) and it's gave me escaped string so i can use that , i hope someone can tell me about what function phpmyadmin use to generate this string from orginal string </p>
  
  <pre><code>$sql = "\'LOAD DATA LOCAL INFILE \"C:\\\\xampp\\\\htdocs\\\\test\\\\import-excel\\\\book1.csv\\\\\" INTO TABLE exam FIELDS TERMINATED BY \",\" \';";
  </code></pre>
  
  <p>tanks </p>