s3
This commit is contained in:
@@ -27,7 +27,7 @@ $stmt->execute();
|
||||
$content = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
?>
|
||||
|
||||
<p style="font-size: 25px; text-align: center; margin-top: 10px;">Page Content List</p>
|
||||
<p style="font-size: 25px; text-align: center; margin-top: 10px;">Faculty List</p>
|
||||
<div class="table-container">
|
||||
<table class="responsive-table">
|
||||
<thead>
|
||||
|
||||
@@ -14,13 +14,13 @@ $page = isset($_GET['page']) && is_numeric($_GET['page']) ? (int) $_GET['page']
|
||||
$offset = ($page - 1) * $results_per_page;
|
||||
|
||||
// Get total number of records
|
||||
$total_stmt = $conn->prepare("SELECT COUNT(*) AS total FROM `scc24`");
|
||||
$total_stmt = $conn->prepare("SELECT COUNT(*) AS total FROM `scc24` WHERE type != 'faculty'");
|
||||
$total_stmt->execute();
|
||||
$total_rows = $total_stmt->fetch(PDO::FETCH_ASSOC)['total'];
|
||||
$total_pages = ceil($total_rows / $results_per_page);
|
||||
|
||||
// Fetch paginated records
|
||||
$stmt = $conn->prepare("SELECT * FROM `scc24` ORDER BY id DESC LIMIT :limit OFFSET :offset");
|
||||
$stmt = $conn->prepare("SELECT * FROM `scc24` WHERE type != 'faculty' ORDER BY id DESC LIMIT :limit OFFSET :offset");
|
||||
$stmt->bindValue(':limit', $results_per_page, PDO::PARAM_INT);
|
||||
$stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
|
||||
Reference in New Issue
Block a user