Forcing joins

SPIP’s automatic detection capabilities are sometimes limited, and so two syntax variants are offered for forcing table joins or the fields of the tables to be used.

// forcing a particular table
<BOUCLE_table(TABLE1 table2 tablen){...}>
// forcing a field in a table
<BOUCLE_table(TABLE){table.field}>

Example

These two loops select articles where an author has a name containing "na" (like "Diana", "Joanna", etc.).

<BOUCLE_art(ARTICLES auteurs_articles auteurs){nom==na}{0,5}>
- #TITRE / #NOM<br />
</BOUCLE_art>
<hr />
<BOUCLE_art2(ARTICLES){auteurs.nom==na}{0,5}>
- #TITRE / #NOM<br />
</BOUCLE_art2>

Note, however, there is a considerable difference between these examples: at present, only the first one declaring all of the tables will make it possible to display a field #FIELD from another table. Therefore, #NOM will only be provided in the first loop.

Author Mark Baber Published : Updated : 12/03/23

Translations : English, français, Nederlands