phpmyadmin显示8行,但页面上只显示第1行

时间:2014-01-09 21:37:14

标签: php html5

<h5>Student-sem</h5>
<p> 
     <select required>";
        <option value="">Please select</option>
        <?php 
            $query = "SELECT distinct `sem_no` FROM `course`,`student_info` WHERE course.c_id=student_info.c_id and `s_id` = '$s_id' ORDER BY `sem_no`";
            if($query_run = mysql_query($query)) {
                 while ($arow = mysql_fetch_array($query_run)){
                     $asem = $arow['sem_no'];
                     echo "<option >" .$asem. "</option>" ;
                 }
            }
            else{
                echo mysql_error();
            }
          ?>
    </select>
</p>

查询在phpmyadmin bt中返回8个值,只有第一个值显示为此代码

0 个答案:

没有答案