Jump to content

Gandalf64

Members
  • Posts

    20
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Gandalf64

  1. I developed my own calendar and if I am understanding you correctly then you could do something like the following: protected function checkForEntry($calDate, $page = 'index.php') { $this->username = isset($_SESSION['user']) ? $_SESSION['user']->username : \NULL; $this->query = 'SELECT 1 FROM cms WHERE page=:page AND DATE_FORMAT(date_added, "%Y-%m-%d")=:date_added'; $this->stmt = static::pdo()->prepare($this->query); $this->stmt->execute([':page' => $page, ':date_added' => $calDate]); $this->result = $this->stmt->fetch(); /* If result is true there is data in day, otherwise no data */ if ($this->result) { return \TRUE; } else { return \FALSE; } } then simply disable the day though you don't have to use a database table to do this as I was just showing it's pretty simple. That is if I'm understanding correctly?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.