我想在重新加载页面后在我的phpmyadmin数据库页面上显示新条目(记录)的确切数量。我在网上看了但是找不到任何有用的东西。也许有人可以帮助我。这是页面的代码:
<?php
header("Refresh: 120");
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="verzoekstyle.css">
<title>Verzoekpagina DJ</title>
</head>
<body id="body">
<div id="tabel">
<?php
$con = mysqli_connect('database','username','password');
if (!$con)
{
echo 'Geen verbinding met server';
}
if (!mysqli_select_db($con, 'eventqy179_verzoeken'))
{
echo 'Database niet geselecteerd';
}
$sql = "SELECT * FROM info";
$query = mysqli_query($con,$sql);
if(!$query)
{
echo 'Onbekende fout gevonden';
}
echo '
<table class="table">
<tr>
<th><h3><b>Artiest</b></h3></th>
<th><h3><b>Titel</b></h3></th>
<th><h3><b>Verwijderen</b></h3></th>
</tr>';
while ($row = mysqli_fetch_array($query))
{
echo '<tr>';
echo '<td><h3>'.$row['artiest'].'</h3></td>';
echo '<td><h3>'.$row['titel'].'</h3></td>';
echo '<td><h3><a href=delete.php?id='.$row['id'].'>Verwijderen</a></h3></td>';
echo '</tr>';
}
echo '</table>';
?>
</div>
</body>
</html>
答案 0 :(得分:0)
已经找到了另一种方式,只有ORDER BY id DESC
。问题是回答