added missing cmd includes
[NeonServV5.git] / mysqlConn.c
index 9f2ba7f6016a0e59de332fa454398d09842a8b9d..81fa038cbbc3af2086ea15e5f11d4c121b005cc8 100644 (file)
@@ -22,7 +22,7 @@ void check_mysql() {
 }
 
 MYSQL_RES *mysql_use() {
-    MYSQL_RES *res = mysql_use_result(mysql_conn);
+    MYSQL_RES *res = mysql_store_result(mysql_conn);
     struct used_result *result = malloc(sizeof(*result));
     if (!result) {
         mysql_free_result(res);
@@ -41,12 +41,14 @@ void mysql_free() {
         mysql_free_result(result->result);
         free(result);
     }
+    used_results = NULL;
     struct escaped_string *escaped, *next_escaped;
     for(escaped = escaped_strings; escaped; escaped = next_escaped) {
         next_escaped = escaped->next;
         free(escaped->string);
         free(escaped);
     }
+    escaped_strings = NULL;
 }
 
 void init_mysql() {