title: C API : Using Variables In mysql query
body: <p>Im trying to call my str date variable in this function:</p>
  
  <pre><code>int main(int argc, char **argv)
  { 
    int status = 0;   
    char query[300], data[15], hora[10];
    strDataHora(data, hora);
    printf("Date: %s\n", data);
    MYSQL *con = mysql_init(NULL);  
  
    if (con == NULL)
    {
        fprintf(stderr, "mysql_init() failed\n");
        exit(1);
    }  
  
   if (mysql_real_connect(con, "localhost", "root", "ufmg3duc", 
           "stream_net", 0, NULL, CLIENT_MULTI_STATEMENTS) == NULL) 
    {
        finish_with_error(con);
    }    
  
   if (mysql_query(con, "SELECT Id FROM audiencia WHERE data LIKE ('%s') AND (hora LIKE ('%:00:%') OR hora LIKE ('%:30:%')) AND hora &gt; '03:01'",data))
  
    {
        finish_with_error(con);
    }
  </code></pre>
  
  <p>But I dont know how to call 'date' in mysql_query:</p>
  
  <pre><code> if (mysql_query(con, "SELECT Id FROM audiencia WHERE data LIKE ('%s') AND (hora LIKE ('%:00:%') OR hora LIKE ('%:30:%')) AND hora &gt; '03:01'",data))
  </code></pre>
  
  <p>How can i select Id when my actual date is a str variable type?</p>