title: How can I shorten this SQL statement?
body: <pre><code>SELECT 
      lesson_id_1, 
      lesson_id_2, 
      lesson_id_3, 
      lesson_id_4, 
      lesson_id_5, 
      lesson_id_6, 
      lesson_id_7, 
      lesson_id_8, 
      lesson_id_9, 
      lesson_id_10  
  FROM hub_attendance 
  WHERE 
      student_id='351' AND 
      course_id = '102' AND 
      (
          lesson_id_1 = 300 OR 
          lesson_id_2 = 300 OR 
          lesson_id_3 = 300 OR 
          lesson_id_4 = 300 OR 
          lesson_id_5 = 300 OR 
          lesson_id_6 = 300 OR 
          lesson_id_7 = 300 OR 
          lesson_id_8 = 300 OR 
          lesson_id_9 = 300 OR 
          lesson_id_10 = 300
      ) 
  LIMIT 1
  </code></pre>
  
  <p>I know it's not pretty but this is my MySQL statement. I am trying to find the lesson_id_xx where it = 300. How can I hone in so that it just returns the single lesson_id_xx and not all of them?</p>
  
  <p>This is what it returns right now:</p>
  
  <pre><code>array(10) { 
      ["lesson_id_1"]=&gt; string(3) "279" 
      ["lesson_id_2"]=&gt; string(3) "292" 
      ["lesson_id_3"]=&gt; string(3) "293" 
      ["lesson_id_4"]=&gt; string(3) "294" 
      ["lesson_id_5"]=&gt; string(3) "295" 
      ["lesson_id_6"]=&gt; string(3) "296" 
      ["lesson_id_7"]=&gt; string(3) "297" 
      ["lesson_id_8"]=&gt; string(3) "298" 
      ["lesson_id_9"]=&gt; string(3) "299" 
      ["lesson_id_10"]=&gt; string(3) "300" 
  }
  </code></pre>
  
  <p>I just want this: </p>
  
  <pre><code>array(10) {
      ["lesson_id_10"]=&gt; string(3) "300" 
  }
  </code></pre>