title: SQL Select string not working
body: <p>I've already posted this but I want to explain it better. I have a website in which students insert their 4 courses and 4 comments for each course, these are the SQL table columns:
  Course1, Course2, Course 3, Course 4, Comment1, Comment2, Comment 3, Comment 4.</p>
  
  <p>I have a search in which any student inputs, for instance, geography (which may be saved in any of the four course columns), and I want my SQL query to return all the comments for geography. For example, if a student saved Geography in position Course2, I want my SQL query to select comment2 where course2 = geography. He may have saved it in course1, so it has to be flexible, but only select the course chosen by the student. This is my current SQL query:</p>
  
  <pre><code>$SQL = "SELECT (Comment1 FROM Students WHERE Course1 = 'geography'), (Comment2 FROM Students WHERE Course2 = 'geography'), (Comment3 FROM Students WHERE Course3 = 'geography'),  (Comment4 FROM Students WHERE Course4 = 'geography')";
  </code></pre>
  
  <p>Currently, this SQL query isn't working.
  I know the structure may seem odd, but logically, as you may understand, this makes sense, though it's probably not the right way to code it. I then print all the geography comments like this:</p>
  
  <pre><code>$null = '';
  if(mysql_num_rows($result)) {
    echo "&lt;ol&gt;";  
   while ($row=mysql_fetch_array($result)) {
    if($row["Class"]!=$null) {  
    if($null!='') {  
    echo "&lt;/ol&gt;&lt;ol type='1'&gt;";   
    } 
   }
  
   echo "&lt;li&gt;&lt;p&gt;" . " " . $row["Comment1"]. " " . $row["Comment2"]." " .    $row["Comment3"] . " " . $row["Comment4"] . "&lt;/li&gt;&lt;/p&gt;";
  $i = $i +1;
  }
  
  echo "&lt;/ol&gt;";
  </code></pre>