I\'m beginning to learn how to use the MySQL C API and have encountered prepared statements. I haven\'t used these before in other languages so it\'s all new to me.
I\'v
You already have the code in
if(mysql_stmt_execute(stmt) != 0) {
printf("Unable to create new session: Could not execute statement\n");
return NULL;
}
If that fails, you didn't insert any rows. The docs contain a full example
You can also use mysql_stmt_affected_rows() after a successful mysql_stmt_execute() to find out how many rows were insterted/updated/deleted.