/ test.php // ... $q = Doctrine_Query::create() ->select('u.id') ->addSelect('(SELECT p.phonenumber FROM Phonenumber p WHERE p.user_id = u.id LIMIT 1) as phonenumber') ->from('User u');
jest to bezpośrednio wzięte ze strony : http://www.doctrine-project.org/documentat...uage:subqueries
Przerobiłem to pod swój schemat:
$records = Doctrine_Query::create() ->select('c.company_name as company') ->addSelect('(select cc.name_surname from ClientContact cc limit 1) as aa') ->from('Client c') ->execute();
Błąd który cały czas się pojawia: Couldn't find class cc
Proszę o pomoc...