Jump to content

Gandalf64

Members
  • Posts

    20
  • Joined

  • Last visited

  • Days Won

    1

Gandalf64 last won the day on July 15 2017

Gandalf64 had the most liked content!

About Gandalf64

  • Birthday August 28

Profile Information

  • Gender
    Male
  • Age
    56

Gandalf64's Achievements

Member

Member (2/5)

2

Reputation

1

Community Answers

  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.