Exemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $link = explode('/', substr($_SERVER["REQUEST_URI"], 1))[0];
     $result = $this->db->prepare("SELECT * FROM blogs WHERE link=?", array($link))->execute()->fetchAllAssoc()[0];
     $this->_blogData = $result;
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $link = explode('/', substr($_SERVER["REQUEST_URI"], 1))[0];
     $budgetData = $this->db->prepare("SELECT * FROM budgets WHERE link=?", array($link))->execute()->fetchAllAssoc()[0];
     $membersData = $this->db->prepare("SELECT * FROM budget_members WHERE budget_id=?", array($budgetData['budget_id']))->execute()->fetchAllAssoc();
     $this->_budgetData = $budgetData;
     $this->_membersData = $membersData;
 }
Exemplo n.º 3
0
 public function __construct($user_id)
 {
     parent::__construct();
     $this->_userId = $user_id;
 }