$link4 = mysql_connect(DB_HOST, DB_LOGIN, DB_PASSWORD); $query4 = "SELECT name, lastname FROM uchenik WHERE class='11' and bykva='Б'"; $result4 = mysql_query($query4, $link4); $row4=mysql_fetch_array($result4) ?> <p> Класс: 11 "Б"</p> <p>Список учеников:</p> <? while($row4=mysql_fetch_array($result4)){ $uc = $row4["lastname"] ." ". $row4["name"]; print_r($uc); } 

It outputs if there are 3 records 2 and 3, and 1 does not display, how to do? Those. There are 3 students: 11 class B, he will only bring 2 and 3.

    2 answers 2

    Delete this line before the loop: $ row4 = mysql_fetch_array ($ result4)

    • Already the problem is solved, above wrote. Nevertheless thank you. - trane294

    Everything, I solved the problems, I had to remove the quotes from 11, firstly, and secondly, I put

     or die(mysql_error()); 

    after

     $result4 = mysql_query($query4, $link4);