来自db的数据仅在第一列上发布记录

时间:2014-03-10 08:58:46

标签: javascript php sql-server

我有一个包含一个具有select type属性的列的表。数据来自数据库,当我使用fetch_array时,第一行是检索下面记录的唯一行是我的问题的脚本。相关查询位于// FOR TERMINAL

之后
    <div id='tab2' class='website_comops_3rd_shift'>// LOOP FOR 3RD SHIFT (1ST)
<table border='1' id='table_id' style='margin: 10px'; cellpadding='1' cellspacing='1' bordercolor='#333333' bgcolor='#C0CCD0' > //
<tr>
<th><font size='2' face='Baskerville' id='systems'>SYSTEMS</font></th>
<th><font size='2' face='Baskerville' id = 'schedule'>SCHED</font></th>
<th><font size='2' face='Baskerville' id='start_time'>START_TIME</font></th>
<th><font size='2' face='Baskerville' id='end_time'>END_TIME</font></th>
<th><font size='2' face='Baskerville' id='duration' class='c_duration'>*</font></th>
<th><font size='2' face='Baskerville'>IP</font></th>
//<th><font size='2' face='Baskerville'>DONE_BY</font></th>
<th><font size='2' face='Baskerville' >REMARKS</font></th>
</tr>

<tr>
<td><font size='2' color='red' face='Baskerville'><b>3RD SHIFT</b></font></td>
</tr>

     while($row = mssql_fetch_array($website_comops_3rd_shift_1_result))
        {
    <tr>
    <td><font size='1' face='Baskerville'>" . $row['SYSTEMS']."</font></td>
    <td><font size='1' face='Baskerville'>" . $row['SCHEDULE']."</font></td>
    <td><input type = 'text' style='width: 130px' font size='1' face='Baskerville' onclick='youClickStart()' class='start_time' id = '".$row['ID']."' value = '". $row['START_TIME']."'> </input></td>
    <td><input type = 'text' disabled = 'disabled' style='width: 130px' font size='1' face='Baskerville' onclick='youClickEnd()' class='end_time' id = '".$row['ID']."' value = '". $row['END_TIME']."'> </input></td>
    <td><font size='2' face='Baskerville'><b>" . $row['DURATION']."</b></font></td>

    //FOR TERMINAL
    <td><select name='terminal' id = 'terminalid' class='termclass' >
            <option value= ''> </option>
                while($row = mssql_fetch_array($website_comops_terminal_result))
                        {
                        <option value= '".$row['terminal']."'>".$row['terminal']."</option>
                        }
    </select></td>

    <td><input type = 'text' style='width: 130px' font size='1' face='Baskerville' class = 'remarks' id = '".$row['ID']."' value = '". $row['REMARKS']."' title = '".$row['REMARKS']."'> </input></td>
    </tr>
        }
    //</tr>
    </table>
    </div>

0 个答案:

没有答案