From 8271c3a5208c0e619cb76a6f9e928b6941205d83 Mon Sep 17 00:00:00 2001 From: aryapradipta9 <aryapradipta9@gmail.com> Date: Thu, 19 Apr 2018 17:39:57 +0700 Subject: [PATCH] fixing cisco bug --- addKmtPengumuman.php | 1 - getAllTanggalHariBesarTigaTahun.php | 8 +++++--- getAllTanggalKegiatanTigaTahun.php | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/addKmtPengumuman.php b/addKmtPengumuman.php index 791c4e1..33ccd98 100755 --- a/addKmtPengumuman.php +++ b/addKmtPengumuman.php @@ -28,4 +28,3 @@ if ($status) { } else { echo "Gagal, komentar tidak berhasil ditambahkan."; } - diff --git a/getAllTanggalHariBesarTigaTahun.php b/getAllTanggalHariBesarTigaTahun.php index bfed742..00ae316 100644 --- a/getAllTanggalHariBesarTigaTahun.php +++ b/getAllTanggalHariBesarTigaTahun.php @@ -15,8 +15,10 @@ require 'dbConnect.php'; $requestedMonth = $_GET["month"]; $requestedYear = $_GET["year"]; $stmt = $conn->query( - "SELECT `tgl` FROM `hari_besar` - WHERE ((YEAR(`tgl`) >= ".$requestedYear-1.") AND (YEAR(`tgl`)<=".$requestedYear+1."))" + "SELECT `tgl` FROM `hari_besar` WHERE ((YEAR(`tgl`) >= " + .$requestedYear - 1 . + ") AND (YEAR(`tgl`)<=" + . $requestedYear+1 . "))" ); $count = $stmt->num_rows; $res = array(); @@ -26,4 +28,4 @@ while ($row = $stmt->fetch_assoc()) { } echo json_encode($res); -$conn->close(); \ No newline at end of file +$conn->close(); diff --git a/getAllTanggalKegiatanTigaTahun.php b/getAllTanggalKegiatanTigaTahun.php index 77ed83d..e51bd18 100644 --- a/getAllTanggalKegiatanTigaTahun.php +++ b/getAllTanggalKegiatanTigaTahun.php @@ -15,7 +15,9 @@ require 'dbConnect.php'; $requestedYear = $_GET['year']; $stmt = $conn->query( "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; $res = array(); @@ -28,4 +30,4 @@ while ($row = $stmt->fetch_assoc()) { echo json_encode($res); -$conn->close(); \ No newline at end of file +$conn->close(); -- GitLab