<?php class Training extends Zend_Db_Table { public $_name = 'szkolenia'; public $_name2 = 'szkolenia-graczy'; public function getLevel($idT, $idG){ $rows = $this->select()->from($this->_name2)->where('ID = ?', '1')->query()->fetchAll(); $object = $rows[0]; } }
Jak wywołam tą funkcję
$training = new Training(); $training->getLevel('1','4');
to dostaję błąd
Kod
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146...
Dlaczego 2 tabele? Otóż w 1 są opisy szkoleń, a w 2 szkolenia wykonane przez graczy i potrzebuje połączyć dane z tych 2 tabel.
Proszę o pomoc