Marek Perończyk Student
Temat: ZF + DOCTRINE - broblem leftjoin
Witam mam problem, żeby połączyć dwie tabeleschema.yml
Customers:
columns:
id:
primary: true
autoincrement: true
type: integer(4)
user_id:
type: integer(4)
types:
type: string(30)
name:
type: string(40)
surname:
options:
collate: utf8_general_ci
charset: utf8
Adress:
columns:
id:
primary: true
autoincrement: true
type: integer(4)
customers_id:
type: integer(4)
street:
type: string(20)
email:
type: string(25)
relations:
Customers:
foreignAlias: adresss
onDelete: cascade
onUpdate: cascade
options:
collate: utf8_general_ci
charset: utf8
leftjoin wygląda tak :
contact2 = Doctrine_Query::create()
->from('customers u')
->leftjoin('u.adresss a')
->execute();
calosc przekazuje do widoku:
$this->view->contacts = $contact2->toarray();
a w widoku
foreach($this->contacts as $index => $contact):
i $contact['email'] i w tym miejscu wskauje blad Notice: Undefined index: email in C:\wamp\www\zends\application\views\scripts\contacts\index.phtml on line 39
Wyświetlane są dane tylko z tabeli Customers. Może ktoś pomoc?
pozdrawiamMarek Perończyk edytował(a) ten post dnia 29.09.10 o godzinie 14:34