---------------------------------------------------------------------
Quantity | Unit | Detials of Items | ISSUED DATE | RETURNED |
| | | | |
---------------------------------------------------------------------
tbl col 1 |tbl col2 | tbl col2 | tbl col 3 | tbl col4 |
---------------------------------------------------------------------
假设我在数据库中有一个有 4 列的表
那是我网站上的表格
我将如何在每个表数据中显示我的表列数据?
请有任何建议
到目前为止,我只有这些代码,因为我是 php 新手,我只使用宏媒体作为界面
$myServer = "server";
$myUser = "user";
$myPass = "password";
$myDB = "mssqldb";
//connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
//select a database to work with
$selected = mssql_select_db($myDB, $dbhandle)
or die("Couldn't open database $myDB");
//declare the SQL statement that will query the database
$query = "SELECT eidnumber ";
$query .= "FROM tablename ";
<table width="935" height="102" border="1">
<tr>
<th width="89" rowspan="2" scope="col">Quantity</th>
<th width="87" rowspan="2" scope="col">Unit</th>
<th width="137" rowspan="2" scope="col">Details of Item(s) Accounted </th>
<th width="221" rowspan="2" scope="col">ISSUED DATE </th>
<th height="51" colspan="3" scope="col">RETURNED</th>
<th width="254" rowspan="2" scope="col">
<p>REMARKS</p> </th>
</tr>
<tr>
<th width="24" height="39" scope="col">C</th>
<th width="18" scope="col">X</th>
<th width="53" scope="col">DATE</th>
</tr>
</table>
<table width="935" border="1">
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
<tr>
<td width="90"> </td>
<td width="86"> </td>
<td width="137"> </td>
<td width="221"> </td>
<td width="24"> </td>
<td width="17"> </td>
<td width="55"> </td>
<td width="253"> </td>
</tr>
</table>