Skip to content
Snippets Groups Projects
Commit 8271c3a5 authored by Arya Pradipta's avatar Arya Pradipta
Browse files

fixing cisco bug

parent bc57a320
No related merge requests found
Pipeline #4310 passed with stages
in 8 minutes and 28 seconds
...@@ -28,4 +28,3 @@ if ($status) { ...@@ -28,4 +28,3 @@ if ($status) {
} else { } else {
echo "Gagal, komentar tidak berhasil ditambahkan."; echo "Gagal, komentar tidak berhasil ditambahkan.";
} }
...@@ -15,8 +15,10 @@ require 'dbConnect.php'; ...@@ -15,8 +15,10 @@ require 'dbConnect.php';
$requestedMonth = $_GET["month"]; $requestedMonth = $_GET["month"];
$requestedYear = $_GET["year"]; $requestedYear = $_GET["year"];
$stmt = $conn->query( $stmt = $conn->query(
"SELECT `tgl` FROM `hari_besar` "SELECT `tgl` FROM `hari_besar` WHERE ((YEAR(`tgl`) >= "
WHERE ((YEAR(`tgl`) >= ".$requestedYear-1.") AND (YEAR(`tgl`)<=".$requestedYear+1."))" .$requestedYear - 1 .
") AND (YEAR(`tgl`)<="
. $requestedYear+1 . "))"
); );
$count = $stmt->num_rows; $count = $stmt->num_rows;
$res = array(); $res = array();
...@@ -26,4 +28,4 @@ while ($row = $stmt->fetch_assoc()) { ...@@ -26,4 +28,4 @@ while ($row = $stmt->fetch_assoc()) {
} }
echo json_encode($res); echo json_encode($res);
$conn->close(); $conn->close();
\ No newline at end of file
...@@ -15,7 +15,9 @@ require 'dbConnect.php'; ...@@ -15,7 +15,9 @@ require 'dbConnect.php';
$requestedYear = $_GET['year']; $requestedYear = $_GET['year'];
$stmt = $conn->query( $stmt = $conn->query(
"SELECT `tanggal_kegiatan` FROM `kegiatan` "SELECT `tanggal_kegiatan` FROM `kegiatan`
WHERE ((YEAR(`tanggal_kegiatan`)>=".$requestedYear-1.") AND (YEAR(`tanggal_kegiatan`)<=".$requestedYear+1."))" WHERE ((YEAR(`tanggal_kegiatan`)>=" .
$requestedYear-1 .
") AND (YEAR(`tanggal_kegiatan`)<=".$requestedYear+1 . "))"
); );
$count = $stmt->num_rows; $count = $stmt->num_rows;
$res = array(); $res = array();
...@@ -28,4 +30,4 @@ while ($row = $stmt->fetch_assoc()) { ...@@ -28,4 +30,4 @@ while ($row = $stmt->fetch_assoc()) {
echo json_encode($res); echo json_encode($res);
$conn->close(); $conn->close();
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment