title: How can I bind text to an SQL IN statement
body: <p>How can I bind text to an '<strong>SQL IN</strong>` statement?  </p>
  
  <pre><code>char *sql = "SELECT "
  "ENTITY_GUID " \
  "FROM ENTITY_TABLE WHERE "
  "ENTITY_OWNER_GUID IN (?)";
  
  int rc = sqlite3_prepare(db, sql, -1, &amp;stmt, 0);
  
  sqlite3_bind_text(stmt, 1, (const char *) char_sql_IN, -1, SQLITE_STATIC);  
  </code></pre>
  
  <p><strong><code>char_sql_IN</code></strong> prints <code>'26', '42', '43'</code> to console  </p>
  
  <p><strong>That is :</strong>  </p>
  
  <pre><code>char *sql = "SELECT "
  "ENTITY_GUID " \
  "FROM ENTITY_TABLE WHERE "
  "ENTITY_OWNER_GUID IN (?)";
  
  int rc = sqlite3_prepare(db, sql, -1, &amp;stmt, 0);
  
  sqlite3_bind_text(stmt, 1, (const char *) char_sql_IN, -1, SQLITE_STATIC);
  
  if (rc != SQLITE_OK) {
      fprintf(stderr, "SQL error: %s\n", sqlite3_errmsg(db));
  }
  
  rc = sqlite3_step(stmt);
  
  while (rc == SQLITE_ROW) {
      long entityGUID = sqlite3_column_int(stmt, 0);
      rc = sqlite3_step(stmt);
  }
  </code></pre>
  
  <p>Thank you all.</p>