我想从具有ID的表中获取特定的行。 我的表有5列命名为:ID,标题,积极,位置,内容根据ID从表中获取特定的行
例如,如果我给ID为5,则数据库必须给我一个ID = 5
现在我有这个
行$result = mysql_query("SELECT * FROM klant1");
$contents = mysql_fetch_array($result);
$rows = mysql_num_rows($result);
for($i = 0; $i <= $rows - 1; $i ++){
echo "<div id='block'>";
echo "<table id='titleTab'>";
echo "<tr id='title'>";
echo "<td>Title</td><td>Active</td><td>Remove</td><td>Position</td><td></td></tr></table>";
echo "<table id='sub'><tr><td>Menu</td>";
echo "<td><input style='float: left;' type='checkbox'/></td>";
echo "<td><img style='height:11px;'src='img/delete.png'/></td>";
echo "<td><select><option value='1'>1</option></select></td>";
echo "<td><img style='float: right; height: 20px;' src='img/save.png'/></td>";
echo "</tr></table> </div>";
}
我想改变关键字,如在当前行权标题标题。
对不起我的英文不好的方式
是否有原因,为什么你有2个表而不是只使用表头? – Yani
不,没有。我认为这是很好,清晰的阅读。 –