MySQL Connector/Arduino insert data from row into an array
Sorry for the inconvenience, problem solved!
The problem was simple as I was getting both two columns except one!

void query_analysis_gates() {
  row_values *row = NULL;
  column_names *columns = NULL;
  SQL_SETUP.cmd_query(QUERY_GATE_SQL);
  columns = SQL_SETUP.get_columns();
  counter = 0;
  do {
    row = SQL_SETUP.get_next_row();
    if (row != NULL) {
      gate_Array[counter] = atoi(row-&gt;values[0]);
      counter++;
    }
  } while (row != NULL);
}


I provide this if anyone needs help with another method but it does the same function.