public String[] query(String table, int ID, String nameID) {
		String[] result = null;
		try {
			String stm = null;
			stm = "select * from " + table + " WHERE " + nameID + " = " + ID + " order by " +nameID;
			con = DriverManager.getConnection(url, user, password);
			pst = con.prepareStatement(stm);
			rs = pst.executeQuery();

			ResultSetMetaData rsmd = rs.getMetaData();
			int n = rsmd.getColumnCount();
			result = new String[n];
			while (rs.next()) {
				for (int j = 1; j <= n; j++) {
					result[j - 1] = "" + rs.getString(j);
				}
			}

		} catch (SQLException ex) {
			Logger lgr = Logger.getLogger(QueryMethod.class.getName());
			lgr.log(Level.SEVERE, ex.getMessage(), ex);

		} finally {

			try {
				if (pst != null) {
					pst.close();
				}
				if (con != null) {
					con.close();
				}

			} catch (SQLException ex) {
				Logger lgr = Logger.getLogger(QueryMethod.class.getName());
				lgr.log(Level.SEVERE, ex.getMessage(), ex);
			}

		}
		return result;
	}