public static void insert(User currUser, Tables tables, Statement stmt,
			String query) {

		ResultSet rset = null;
		if (query.toLowerCase().contains("users")) {

		} else {

			Iterator tableIter = tables.getIter();

			while (tableIter.hasNext()) {

				String table = (String) tableIter.next();
				// System.out.println(table + " ");
				if (query.toUpperCase().contains(table)) {
					try {
						System.out.println("SELECT INTLEVEL " + "from TABLEINT"
								+ " where TABLENAME =" + "'"
								+ table.toUpperCase() + "'");
						rset = stmt.executeQuery("SELECT INTLEVEL "
								+ "from TABLEINT" + " where TABLENAME =" + "'"
								+ table.toUpperCase() + "'");

					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}
			int tablelevel = -1;
			try {
				while (rset.next()) {
					tablelevel = Integer.parseInt(rset.getString(1));
					// System.out.println(rset.getString(1));
				}

				if (tablelevel <= currUser.intLevel && tablelevel != -1) {
					query = query.substring(0, query.lastIndexOf(')')) + ","
							+ currUser.intLevel + ")";
					// System.out.println(query);
					stmt.executeUpdate(query);
				}

			} catch (NumberFormatException e) {
				e.printStackTrace();
			} catch (SQLException e) {
				e.printStackTrace();
			}

		}

	}