Finally fixed #18 (mysql_free_result only accepts SELECT queries, not INSERT/UPDATE)