【发布时间】:2017-10-03 20:39:09
【问题描述】:
在表格中我想要链接 a 当单击转到其他页面并选择此类别中的所有产品时 我想放一个,但我不知道怎么做,因为从数据库中选择的 td 可以是多个
$sql = 'SELECT categorie.id,name,username FROM categorie,user
where user.id = categorie.added_by ';
$result = $mysqli->query($sql);
?>
<table class="data-table">
<h1>Categorie List<h1>
<thead>
<tr>
<th>Id</th>
<th>Username</th>
<th>Added By</th>
</tr>
</thead>
<tbody>
<?php
if($result == false)echo "errrrr";
else{
while ($row = mysqli_fetch_array($result))
{
echo '<tr>
<td>'.$row['id'].'</td>
// here i want link <a> when click go to other page and
// select all products in this categorie
<td>'.$row['name'].'</td>
<td>'.$row['username'].'</td>
</tr>';
}
}
?>
</tbody>
</table>
在表格中我想要链接一个当点击转到其他页面并选择该类别中的所有产品时
【问题讨论】: