mam sobie taki kodzik:
<?php class showContact { private $result; private $db; public function __construct(PDO $db) { $this->db = $db; } private function selectContact () { $sql=$this->db->prepare('select * from o_content where id=:id'); $sql->bindValue(':id',1); $sql->execute(); if ($row=$sql->fetch()) { return $this->result=$row; } else { return $this->result=false; } } public function getContact() { return $this->result['content']; } } ?>
użycie:
<?php $kontakt = new showContact($pdo); ?>
I gdzie błąd mam ?