a simple while loop does not read all matches. Reads only the first match and ignores the others : The problem is the code skips the first echo statement no matter what.
     
$query = mysql_query("SELECT index_no, lesson FROM c8_lessons_list WHERE   index_no ='456'");

     ($row = mysql_fetch_array($query));

     if ($row['index_no'] !== '456' && $row['lesson'] !== "Fertilisation process"  )

     {
     echo '<a href="file:///D|/CC-Gate/localhost">Fertilisation process</a>';
     }
      else
     {
     echo 'Fertilisation process Completed';
     }
