Bonjour à vous,
je précise que j'ai lu les tuto de J.Pauli et que j'ai passé déjà pas mal de temps à chercher une solution mais là je ne vois plus.
Les informations concernant certains contacts sont divisés en deux tables qui n'ont pas exactement les mêmes champs
Donc voilà :
Et ma page s'affiche toute blanche sans aucun code source !!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 //mon controleur function indexAction() { $this->view->title = "Contact"; $contact = new Contact(); $tousLesContacts = $contact->fetchAll(); $arrayContact=array(); foreach($tousLesContacts as $unDesContacts){ $arrayContact.=$unDesContacts->findDependentRowset('Personne'); } $this->view->contacts=$arrayContact; } //MOR pour la table user class Contact extends Zend_Db_Table_Abstract { protected $_name="user"; protected $_dependentTables= array("Personne"); } //MOR pour la table personne class Contact extends Zend_Db_Table_Abstract { protected $_name="personne"; protected $_referenceMap = array('Personne' =>array('columns' => 'IDPersonne', 'refTableClass' => 'Contact', 'refColumns' => 'IDPersonne')); } //Ma vue <?php foreach($this->contacts as $contact) : ?> <tr> <td><?php echo $this->escape($contact->GenrePersonne);?></td> <td><?php echo $this->escape($contact->NomPersonne);?></td> <td><?php echo $this->escape($contact->PrenomPersonne);?></td> <td><?php echo $this->escape($contact->MailPersonne);?></td> <td><?php echo $this->escape($contact->AdressePersonne);?></td> <td><?php echo $this->escape($contact->CPPersonne);?></td> <td><?php echo $this->escape($contact->VillePersonne);?></td> <td><?php echo $this->escape($contact->TelPersonne);?></td> </tr> <?php endforeach; ?>
J'ai prêté attention en utilisant $_dependentTables à bien appeler la classe et non pas la table mais rien n'y fait ...
J'ai peut-être pas assez de recul et si quelqu'un peut me venir en aide ...
Merci
Partager