title: Mysql PHP insert with quotes and double quotes
body: <p>I am trying to insert data into a table that contains both quotes and double quotes.  How can i escape them?  </p>
  
  <p>The value i want to add is:</p>
  
  <pre><code> default=1,name='Bob',lastName="Jones"
  
  
   $ins = "INSERT into table (field1,field2,fiel3,) values ('data1','data2',????)";
  </code></pre>
  
  <p>If i use single quote, the Bob part gets broken. If I use double quote, the Jones part gets broken.</p>
  
  <p>If i use mysql_escape_string what would this look like?</p>
  
  <pre><code>$data3 = mysql_escape_string(????);
  </code></pre>
  
  <p>Again if i use single quote, the Bob part gets broken. If I use double quote, the Jones part gets broken.</p>
  
  <p>I know its a terrible db design but I have no control over the fields i need to add or the syntax of the values.  I have to insert the value exactly as seen above.</p>