public void updateTeacher(Teacher teacher)
	{
		PreparedStatement ps;
		try {
			if(teacher.getId() > 0)
			{
				ps = con.prepareStatement("UPDATE teacher SET name=?, value=? WHERE id=?");
				ps.setInt(3, teacher.getId());
			}
			else
			{
				ps = con.prepareStatement("INSERT INTO teacher (name, value) VALUES (?, ?)");
			}
			ps.setString(1, teacher.getName());
			ps.setInt(2, teacher.getValue());
			ps.executeUpdate();
			ps.close();
			
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}