public void close() {
		if(resultSet != null){
			try {
				resultSet.close();				
			} catch (SQLException e) {
				System.out.println("Warning: Couldn't close results.");
			}
		}
		if(statement != null){
			try {
				statement.close();
			} catch (SQLException e) {
				System.out.println("Warning: Couldn't close the statement.");
			}
		}
		if(connection != null){
			try {
				connection.close();
				flag = 0;
			} catch (SQLException e) {
				System.out.println("Warning: Couldn't close the connection.");
			}
		}
			
	}