Помогите какие строчки мне добавить в код чтобы получить то что выше, нужно сделать поиск по промежутку дат, действия,Ник админа, поиск по игроку
<!DOCTYPE html>
<html style="background: #2C2B2C;">
<head>
<meta charset="UTF-8">
<title>Логи</title>
<style>
td:nth-child(5),td:nth-child(6){text-align:center;}
table{position: absolute; border-spacing: 0;border-collapse: collapse;width: 70%;box-shadow: 0px 4px 100px rgb(255 255 255 / 25%);}
td, th{padding: 10px;border: 1px solid #282828;}
tr:nth-child(odd) { background-color: #333333; }
</style>
<link rel="stylesheet" href="https://logsadm.night5rp.ru/css/main.css">
</head>
<body>
<div class="form">
<form name="search" method="post" action="search.php">
<input type="search" name="query" placeholder="Поиск">
<button type="submit">Найти</button>
</form>
</div>
<?php
$db_server = "localhost";
$db_user = "u1674827_logs";
$db_password = "05091106gg";
$db_name = "u1674827_logs";
try {
$db = new PDO("mysql:host=$db_server;dbname=$db_name", $db_user, $db_password,array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8"));
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT time, admin, action, player, idkey FROM adminlog";
$statement = $db->prepare($sql);
$statement->execute();
$result_array = $statement->fetchAll();
echo "<div class=\"table\">";
echo "<table><tr><th>time</th><th>admin</th><th>action</th><th>player</th><th>idkey</th></tr>";
foreach ($result_array as $result_row) {
echo "<tr>";
echo "<td align=\"center\">" . $result_row["time"] . "</td>";
echo "<td align=\"center\">" . $result_row["admin"] . "</td>";
echo "<td align=\"center\">" . $result_row["action"] . "</td>";
echo "<td align=\"center\">" . $result_row["player"] . "</td>";
echo "<td align=\"center\">" . $result_row["idkey"] . "</td>";
echo "</tr>";
}
echo "</table>";
echo "</div>";
}
catch(PDOException $e) {
echo "Ошибка при создании записи в базе данных: " . $e->getMessage();
}
$db = null;
?>
</body>
</html>