Example #1
0
    /**
     * Fetch activity for preview
     * @param int $id
     * @return array
     */
    protected function fetchActivity($id)
    {
        if (is_null($this->FetchStatement)) {
            $this->FetchStatement = DB::getInstance()->prepare('SELECT
					' . implode(',', Preview::keys()) . '
				FROM `' . PREFIX . 'training`
				WHERE `id`=:id
				LIMIT 1');
        }
        $this->FetchStatement->execute(array(':id' => $id));
        return $this->FetchStatement->fetch();
    }