bonjour
soit une table spip_T1
| id_T1 | champ1 | ... |
une table spip_T2
| id_T2 | champ2 | ... |
et une table intermédiaire spip_T3
| id_T1 | id_T2 | champ3 | ... |
une boucle
<BOUCLE_test(T2) {id_T1} {par champ3}>
#CHAMP2 - #CHAMP3
</BOUCLE_test>
m'affiche parfaitement ($tables_jointures['spip_T2'][] = 'T3'
les valeurs de champ2 bien triées
MAIS, #CHAMP3 ne renvoit rien ??
merci d'avance pour une piste
thierry
Evidement une solution consiste à écrire la boucle comme suit
<BOUCLE_test(T2) {id_T1} {par champ3}>
<BOUCLE_T3(T3) {id_T1} {id_T2}>
#CHAMP2 - #CHAMP3
</BOUCLE_T3>
</BOUCLE_test>
ou encore
<BOUCLE_test(T3) {id_T1} {par champ3}>
<BOUCLE_T2(T2) {id_T2}>
#CHAMP2 - #CHAMP3
</BOUCLE_T2>
</BOUCLE_test>
mais je trouve ça... enfin pas bien car ça me semble multiplier les requetes.
merci pour vos avis
Moi j'essayerai bien la boucle suivante :
<BOUCLE_test(T3 spip_t2 spip_t3) {id_T1} {par champ3}>
#CHAMP2 - #CHAMP3
</BOUCLE_test>
Xavier BUROT
Selon thierry <thierry.schmit@free.fr>:
Evidement une solution consiste à écrire la boucle comme suit
<BOUCLE_test(T2) {id_T1} {par champ3}>
<BOUCLE_T3(T3) {id_T1} {id_T2}>
#CHAMP2 - #CHAMP3
</BOUCLE_T3>
</BOUCLE_test>
ou encore
<BOUCLE_test(T3) {id_T1} {par champ3}>
<BOUCLE_T2(T2) {id_T2}>
#CHAMP2 - #CHAMP3
</BOUCLE_T2>
</BOUCLE_test>
mais je trouve ça... enfin pas bien car ça me semble multiplier les
requetes.
merci pour vos avis
_______________________________________________
spip-zone@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone
Moi j'essayerai bien la boucle suivante :
<BOUCLE_test(T3 spip_t2 spip_t3) {id_T1} {par champ3}>
#CHAMP2 - #CHAMP3
</BOUCLE_test>
et tu aurais parfaitement raison.
merci