diff --git a/article_overview.php b/article_overview.php index 35d7db6..a7ed913 100644 --- a/article_overview.php +++ b/article_overview.php @@ -72,7 +72,11 @@ // Wenn nach einem Artikel gesucht wird if(isset($_GET['search']) && !empty($_GET['search'])){ $search = $_GET['search']; - $sql .= " WHERE item_name LIKE '%" . $search . "%' OR manufacturer LIKE '%" . $search . "%' OR location LIKE '%" . $search . "%' OR barcode LIKE '%" . $search . "%'"; + $sql .= " WHERE + item_name LIKE '%" . $search . "%' OR + manufacturer LIKE '%" . $search . "%' OR + location LIKE '%" . $search . "%' OR + barcode LIKE '%" . $search . "%'"; } $result = $conn->query($sql); @@ -80,12 +84,12 @@ if ($result->num_rows > 0) { // Daten ausgeben while($row = $result->fetch_assoc()) { - $expiration_date = strtotime($row["expiration_date"]); - $ten_days_before_expiry = strtotime("-10 days", $expiration_date); // 10 Tage vor dem Ablaufdatum - $current_date = strtotime(date("Y-m-d")); // Aktuelles Datum + $expiration_date = date("d.m.Y", strtotime($row["expiration_date"])); + $ten_days_before_expiry = date("d.m.Y", strtotime("-10 days", strtotime($row["expiration_date"]))); // 10 Tage vor dem Ablaufdatum + $current_date = date("d.m.Y"); // Aktuelles Datum echo "