A court says emergency workers must be allowed to enter a mine where hundreds are thought to be without food and water.