Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
div wird alle drei sec. aktualisiert
#2
habe noch was entdeckt, es schiebt sich was vor die 1, nachdem ich einen rahmen angelegt habe

Code:
nav.pagination {
     margin-left: 10px;    
     border: thin solid;
     background-color: silver;
     }


[Bild: html_bild_3.png]
PHP-Code:
<?php
include_once 'dbconnect.php';

$limit = 15;

$page = isset($_GET['page']) ? $_GET['page'] : 1;
$start = ($page - 1) * $limit;

$result = mysqli_query($link, "SELECT TelegramStorage.id, TelegramStorage.Address, TelegramStorage.Flags, TelegramStorage.Message, TelegramStorage.datum, TelegramStorage.unerledigt,
                                       TelegramDescription.address, TelegramDescription.bezeichnung, TelegramDescription.wache, TelegramDescription.color_n, TelegramDescription.hinweis, TelegramDescription.background_n,
                                       TelegramDescription.gruppe, TelegramDescription.kommune, TelegramDescription.kreis, TelegramDescription.bosmon FROM TelegramStorage
                          JOIN TelegramDescription WHERE LEFT (TelegramStorage.Address, 7) = LEFT(TelegramDescription.address, 7) AND (TelegramDescription.bosmon = 1) AND (TelegramStorage.Flags = 1048576 OR
                               TelegramStorage.Flags = 0 OR TelegramStorage.Flags = 1 OR TelegramStorage.Flags = 537919488 OR TelegramStorage.Flags = 536870912) ORDER BY ID DESC LIMIT
$start, $limit");
  
$rows
= mysqli_fetch_all($result, MYSQLI_ASSOC);

$count = mysqli_query($link, "SELECT count(id) AS id FROM TelegramStorage JOIN TelegramDescription WHERE LEFT (TelegramStorage.Address, 7) = LEFT(TelegramDescription.address, 7)
                               AND (TelegramDescription.bosmon = 1) AND (TelegramStorage.Flags = 1048576 OR TelegramStorage.Flags = 0 OR TelegramStorage.Flags = 1 OR TelegramStorage.Flags = 537919488
       OR TelegramStorage.Flags = 536870912) ORDER BY ID DESC"
);
 
$daten
= mysqli_fetch_all($count, MYSQLI_ASSOC);

$total = $daten[0]['id'];
$pages = ceil( $total / $limit );
$next = (int)$page + 1;
if (
$next > $pages) { $next = 1; }
?>

Code:
<nav class="pagination" id="pagination">
      <ul class="pagination">
       <?php for ($i = 1; $i<= $pages; $i++) : ?>
        <li class="pagination"><a href="monitorOESoft_unerledigte_einsaetze.php?page=<?= $i; ?>"> <?= $i; ?> </a></li>
       <?php endfor; ?>
      </ul>
     </nav>


warum ist das so?
Zitieren


Nachrichten in diesem Thema
RE: div wird alle drei sec. aktualisiert - von black79 - 30.06.2022, 15:22

Gehe zu:


Benutzer, die gerade dieses Thema anschauen:
1 Gast/Gäste