Napisalem sobie taka klase :
<?php class Table { public $tableName; public $db; public function __construct($host, $user, $pass, $dbname) { } function find($id) { throw new Exception('Error finding row'); } return $row; } function setTableName($tableName) { return $this->tableName = $tableName; } } class Row { function insert() { } function update() { } function delete() { } } try { $tabelka = new Table('localhost', 'root', 'wmateusz', 'spam'); $tabelka->setTableName('tokens'); $tabelka->find(2); } catch(Exception $e){ }
No ale nie wiem jak wyswietlic teraz wiersz ktory zwraca funkcja find().......chodzi mi o jakies sensowne obiektowe rozwiazanie.....
----------------------------------------------------------------------------
no tak, brakuje wrzucenia wynikow zapytania do tabelki np mysql_fetch_assoc.....