local changes.
This commit is contained in:
@@ -32,7 +32,7 @@ function getTripCount()
|
||||
$conn = openDatabaseConnection();
|
||||
|
||||
// SQL query to count the number of rows
|
||||
$sql = "SELECT COUNT(*) AS total FROM trips WHERE start_date > CURDATE()";
|
||||
$sql = "SELECT COUNT(*) AS total FROM trips WHERE published = 1 AND start_date > CURDATE()";
|
||||
$result = $conn->query($sql);
|
||||
|
||||
// Fetch the count from the result
|
||||
@@ -1391,7 +1391,8 @@ function countUpcomingTrips()
|
||||
// Open database connection
|
||||
$conn = openDatabaseConnection();
|
||||
|
||||
$query = "SELECT COUNT(*) AS trip_count FROM trips WHERE start_date > CURDATE()";
|
||||
$query = "SELECT COUNT(*) AS trip_count FROM trips WHERE published = 1 AND start_date > CURDATE()";
|
||||
|
||||
|
||||
if ($result = $conn->query($query)) {
|
||||
$row = $result->fetch_assoc();
|
||||
|
||||
Reference in New Issue
Block a user