title: Escaping or Using C String in SQL statement
body: <p>I'm using Connector C API to connect to mysql database. I'm having issue with using the value of a c string in a sql statement.</p>
  
  <pre><code>char *somequery = "SELECT username, password from tableABC WHERE username='john'";
  </code></pre>
  
  <p>The above is working fine, if I user a simple text 'john'. But if I replace it with a string (which is set earlier in the program), it doesn't work and breaks down with a 500 error. </p>
  
  <pre><code>char *ghob = "john";
  char *somequery = "SELECT username, password from tableABC WHERE username=ghob";
  </code></pre>
  
  <p>I have tried a few things, but to no avail. Any help would be appreciated. </p>