Maty_Malol

Untitled

Nov 22nd, 2020
497
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. include("conn.php");
  4.  
  5.      if ($sql = $baza->prepare("SELECT imie, data_urodzin FROM osoby WHERE
  6.                                data_urodzin >= DATE(NOW() - INTERVAL 30 DAY) AND data_urodzin <= DATE(NOW() + INTERVAL 31 DAY)")) {
  7.          $sql->execute();
  8.          $sql->bind_result($imie, $dataUrodzin);
  9.  
  10.          while ($sql->fetch())
  11.              $terminy[] = array(
  12.                 "imie" => $imie,
  13.                 "okazja" => "urodziny",
  14.                 "dataUrodzin " => $dataUrodzin
  15.              );
  16.              $sql->close();
  17.      }
  18.  
  19.      if ($sql = $baza->prepare("SELECT imie, data_imienin FROM osoby WHERE
  20.                                data_imienin >= DATE(NOW() - INTERVAL 30 DAY) AND data_imienin <= DATE(NOW() + INTERVAL 31 DAY)")) {
  21.          $sql->execute();
  22.          $sql->bind_result($imie, $dataImienin);
  23.  
  24.          while ($sql->fetch()) {
  25.              $terminy[] = array(
  26.                  "imie" => $imie,
  27.                  "okazja" => "imieniny",
  28.                  "dataImienin " => $dataImienin,
  29.              );
  30.          }
  31.          $sql->close();
  32.      }
  33.     echo json_encode($terminy);
  34.  
  35.  
  36. $baza->close();
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×