title: Class Scheduling algorithm to show best match with criteria?
body: <p>I am looking to create a system where you can input the courses (3-7 courses) that you want to take at a college and then select preferences (Morning, Day, Evening, Night / M, T, W, TR, F). </p>
  
  <p>I need a way so that when the program queries the database (MySQL) it returns the best possible schedule that was made according to those parameters. I am writing it in php. </p>
  
  <p>Does any one know the best way to do this? Or a link to some sample code I could understand it from?</p>