Wikipedia:Elenchi generati offline/Proposte interlink en: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
- 1
Etichette: Modifica da mobile Modifica da web per mobile Modifica da mobile avanzata
ValterVBot (discussione | contributi)
m tag source deprecati, replaced: <source lang= → <syntaxhighlight lang= (3), </source> → </syntaxhighlight> (3)
Riga 18:
===Generazione della tabella di appoggio===
Creare la tabella
<sourcesyntaxhighlight lang="mysql">
CREATE TABLE entitles(
title varchar(255) collate latin1_bin
);
</syntaxhighlight>
</source>
La tabella va riempita eseguendo la query
<sourcesyntaxhighlight lang="mysql">
INSERT INTO entitles(
SELECT page_title
Riga 32:
SELECT * FROM categorylinks WHERE cl_from=page_id AND cl_to = 'All_disambiguation_pages' )
);
</syntaxhighlight>
</source>
===Generazione dell'elenco===
<sourcesyntaxhighlight lang="mysql">
SELECT CONCAT('#[[', page_title, ']] - [[:en:', title, ']]')
FROM entitles JOIN page ON title=page_title
Riga 41:
AND NOT EXISTS( SELECT * FROM templatelinks WHERE tl_from = page_id AND tl_namespace=10 AND tl_title IN ('Disambigua', 'Sigla2', 'Sigla3') )
ORDER BY page_title;
</syntaxhighlight>
</source>
 
==Elenco==