query += '\'' + key[i].toString() + '\'';
query += "\"" + Utils.backQuoteChars(key[i].toString()) + "\"";
  public void putResultInTable(String tableName,			       ResultProducer rp,			       Object [] key,			       Object [] result)    throws Exception {        String query = "INSERT INTO " + tableName      + " VALUES ( ";    // Add the results to the table    for (int i = 0; i < key.length; i++) {      if (i != 0) {	query += ',';      }      if (key[i] != null) {	if (key[i] instanceof String) {	  query += '\'' + key[i].toString() + '\'';	} else if (key[i] instanceof Double) {	  query += safeDoubleToString((Double)key[i]);	} else {	  query += key[i].toString();	}      } else {	query += "NULL";      }    }    for (int i = 0; i < result.length; i++) {      query +=  ',';      if (result[i] != null) {	if (result[i] instanceof String) {	  query += "'" + result[i].toString() + "'";	} else  if (result[i] instanceof Double) {	  query += safeDoubleToString((Double)result[i]);	} else {	  query += result[i].toString();	  //!!	  //System.err.println("res: "+ result[i].toString());	}      } else {	query += "NULL";      }    }    query += ')';        if (m_Debug) {      System.err.println("Submitting result: " + query);    }    if (execute(query)) {      if (m_Debug) {	System.err.println("...acceptResult returned resultset");      }    }  }