我有一个数据库, 我正试图通过 PHP 进行编辑。 在主页上, 我想只显示表格的前15行, 然后点击用户来生成更多的表格行 。
<?php
include( ../config.php );
$result = $mysqli->query("SELECT uid, title, description, tblFacilityHrsDateTimes.* FROM tblFacilityHrs LEFT JOIN tblFacilityHrsDateTimes ON tblFacilityHrs.uid = tblFacilityHrsDateTimes.owner_uid ORDER BY tblFacilityHrs.title") or die($mysqli->error);
while($row =$result->fetch_assoc()){
extract ($row);
echo "<tr>";
echo "<td> {$id} </td>"; //hide when finished
echo "<td> {$title} </td>";
echo "<td> {$description} </td>";
echo "<td> {$startEventDate} </td>";
echo "<td> {$endEventDate} </td>";
echo "<td> {$startTime} </td>";
echo "<td> {$endTime} </td>";
echo "<td> {$days} </td>";
echo "<td> {$recurrence} </td>";
echo "<td> {$finalDate} </td>";
echo "<td>";
echo "<a class="buttons" href=edit.php?id={$id}&uid={$uid}>Edit</a><span class= icon ></span></a>
";
echo " / ";
echo "<a class="buttons" href= javascript: Confirm() >Delete</a>";
echo "</td>";
echo "</tr>";
echo "</div>";
}
echo "</table>";
$result->free();
$mysqli->close();
?>