private void HTTPVariables2SQLQueries() {
        Connection conn = null;
        Statement s = null;

        try {
            if ((conn = this.JavaDBAccess.setConn()) != null) {
                System.out.println("Connected to database " + JavaDBAccess.getDatabaseName());
            } else {
                throw new Exception("Not connected to database " + JavaDBAccess.getDatabaseName());
            }


            conn.setAutoCommit(false);

            // Start a transaction by inserting a record in the TARGET_PHP_FILES_FUNCTIONS table
            s = conn.createStatement();
            s.executeUpdate("DELETE FROM HTTP_VARIABLES_SQL_VARIABLES");
            s.executeUpdate("INSERT INTO HTTP_VARIABLES_SQL_VARIABLES (MYSQL_QUERIES_VARIABLE, TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLE, COUNT) (SELECT MYSQL_QUERIES_VARIABLES.ID ID1, TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.ID ID2, COUNT(*) FROM MYSQL_QUERIES_VARIABLES, MYSQL_QUERIES, MYSQL_PROXY_PACKETS, TARGET_PHP_FILES_RUNS_FUNCTIONS, TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES WHERE MYSQL_QUERIES_VARIABLES.MYSQL_QUERY = MYSQL_QUERIES.ID AND MYSQL_QUERIES.MYSQL_PROXY_PACKET_CLIENT = MYSQL_PROXY_PACKETS.ID AND MYSQL_PROXY_PACKETS.TARGET_PHP_FILES_RUNS_FUNCTION = TARGET_PHP_FILES_RUNS_FUNCTIONS.ID AND TARGET_PHP_FILES_RUNS_FUNCTIONS.ID = TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.TARGET_PHP_FILES_RUNS_FUNCTION AND MYSQL_QUERIES_VARIABLES.VALUE LIKE '%'||TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.DECODED_VALUE||'%' GROUP BY MYSQL_QUERIES_VARIABLES.ID, TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.ID)");
            s.executeUpdate("DELETE FROM HTTP_VARIABLES_SQL_QUERIES");
            s.executeUpdate("INSERT INTO HTTP_VARIABLES_SQL_QUERIES (MYSQL_QUERY, TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLE, COUNT_STRUCTURE) (SELECT MYSQL_QUERIES.ID AS ID1, TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.ID AS ID2, COUNT(*) FROM MYSQL_QUERIES, MYSQL_PROXY_PACKETS, TARGET_PHP_FILES_RUNS_FUNCTIONS, TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES WHERE MYSQL_QUERIES.MYSQL_PROXY_PACKET_CLIENT = MYSQL_PROXY_PACKETS.ID AND MYSQL_PROXY_PACKETS.TARGET_PHP_FILES_RUNS_FUNCTION = TARGET_PHP_FILES_RUNS_FUNCTIONS.ID AND TARGET_PHP_FILES_RUNS_FUNCTIONS.ID = TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.TARGET_PHP_FILES_RUNS_FUNCTION AND MYSQL_QUERIES.SQL_COMMAND LIKE '%'||TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.DECODED_VALUE||'%' GROUP BY MYSQL_QUERIES.ID, TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.ID)");
            s.executeUpdate("UPDATE HTTP_VARIABLES_SQL_QUERIES SET COUNT_VARIABLES=(SELECT SUM(COUNT) FROM HTTP_VARIABLES_SQL_VARIABLES, MYSQL_QUERIES_VARIABLES WHERE HTTP_VARIABLES_SQL_VARIABLES.MYSQL_QUERIES_VARIABLE=MYSQL_QUERIES_VARIABLES.ID AND HTTP_VARIABLES_SQL_QUERIES.TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLE=HTTP_VARIABLES_SQL_VARIABLES.TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLE AND MYSQL_QUERIES_VARIABLES.MYSQL_QUERY=HTTP_VARIABLES_SQL_QUERIES.MYSQL_QUERY)");
            s.executeUpdate("UPDATE HTTP_VARIABLES_SQL_QUERIES SET COUNT_VARIABLES=0 WHERE COUNT_VARIABLES IS NULL");
            s.executeUpdate("UPDATE HTTP_VARIABLES_SQL_QUERIES SET COUNT_STRUCTURE=COUNT_STRUCTURE-COUNT_VARIABLES");
            s.close();

        } catch (Throwable e) {
            InspectionTextArea.setText("Errors in HTTP2SQLVariables executed!");
            System.out.println(
                    "exception thrown:");

            if (e instanceof SQLException) {
                JavaDBAccess.printSQLError((SQLException) e);
            } else {
                e.printStackTrace();
            }

        } finally {
            try {
                conn.commit();
                conn.close();
            } catch (Throwable e) {
            }
        }
    }