Execute an insert query using C
<br>
I want to insert into mysql database from C.<br>
Here is my code:<br>
 
...

    for (i=0;i<nb_of_subscribers*hits_subscriber;i++)
       
       { RandomSub= rand() % nb_of_subscribers + 1;
       RandomContent= rand() % (contents_tag*tags) + 1;
       
        mysql_query(conn, "INSERT INTO CONTENT_HITS(CONTENT_ID,SUBSCRIBER_ID) VALUES(RandomContent,RandomSub)");}

...
The problem is :The insert query is not executed and nothing appears in the database.<br>
Thank you.

   
Execute an insert query using C
===

<br>
I want to insert into mysql database from C.<br>
Here is my code:<br>
 
...

    for (i=0;i<nb_of_subscribers*hits_subscriber;i++)
       
       { RandomSub= rand() % nb_of_subscribers + 1;
       RandomContent= rand() % (contents_tag*tags) + 1;
       
        mysql_query(conn, "INSERT INTO CONTENT_HITS(CONTENT_ID,SUBSCRIBER_ID) VALUES(RandomContent,RandomSub)");}

...
The problem is :The insert query is not executed and nothing appears in the database.<br>
Thank you.

   