Package version/links
pmwiki-2.3.13
Skin - notebook-nt
txtdb-2.2.1-alpha-2-20230215
Txtdb - Sql query using txtdb directives
- Data source in 'Csv in wikipage' or 'PmWiki simple table'
- Output as 'PageVars'
Table(from PmWiki Simple Table) - Output(PageVar)
(:txtdbPageVar:)
(:txtdbSet id3 'Cookbook.Txtdb-locale' Language:)
(:txtdbQuery id3 "SELECT keyword,french FROM action WHERE keyword IN (Edit,Save,Delete,Read)":)
(:txtdbDraw id3 pagevar prefix=txtdb :)
(:txtdbPageVarEnd:)
----
||border=1 width=50%
||! EDIT ||! SAVE ||! DELETE ||! READ ||
|| "{$txtdb_Edit}" || "{$txtdb_Save}" || "{$txtdb_Delete}" || "{$txtdb_Read}" ||
|
EDIT | SAVE | DELETE | READ |
"Éditez" | "Sauf" | "Suppression" | "Lu" |
|
Table(from PmWiki Simple Table) - Output(PageVar from Transposed row)
(:txtdbPageVar:)
(:txtdbSet id4 'Cookbook.Txtdb-sample3' mydb2:)
(:txtdbQuery id4 "SELECT * FROM GreekAlphabet LIMIT 1":)
(:txtdbDraw id4 pagevar 'transpose' UseFirstAsKey=0:)
(:txtdbPageVarEnd:)
||bgcolor=beige width=50% border=1
|| col1 || col2 || col3 || col4 || col5 ||
|| {$col1} || {$col2} || {$col3} || {$col4} || {$col5} ||
|
col1 | col2 | col3 | col4 | col5 |
zeta | eta | theta | iota | kappa |
|
Reference Table(from PmWiki Simple Table) - Output(Wikitable,Sortable)
(:table:action:)
:lang: spanish
(:txtdbSet id2 'Cookbook.Txtdb-locale' Language:)
(:txtdbQuery id2 "SELECT keyword,{$:lang} FROM {$:table} WHERE keyword IN (Edit,Save,Delete,Read)":)
(:txtdbDraw id2 wikitable sortable id=id100:)
|
- lang
- spanish
keyword | spanish |
Edit | Corrija |
Delete | Cancelación |
Save | Reserva |
Read | Leído |
|
Reference Table(from PmWiki Simple Table) - Output(Wikitable,Sortable)
(:txtdbSet id1 'Cookbook.Txtdb-locale' Language:)
(:txtdbQuery id1 "SELECT * FROM action WHERE keyword IN (Edit,Save,Delete,Read)":)
(:txtdbDraw id1 wikitable sortable id=id101:)
|
id | keyword | english | french | german | spanish |
6 | Edit | Edit | Éditez | Redigieren Sie | Corrija |
9 | Delete | Delete | Suppression | Löschung | Cancelación |
10 | Save | Save | Sauf | Außer | Reserva |
11 | Read | Read | Lu | Gelesen | Leído |
|
Reference Table(from PmWiki Simple Table) - Output(Wikitable,Sortable)
(:txtdbSet id10 'Cookbook.Txtdb-sample3' mydb2:)
(:txtdbQuery id10 "SELECT * FROM GreekAlphabet LIMIT 3":)
(:txtdbDraw id10 wikitable 'sortable' id=id102 :)
|
col1 | col2 | col3 | col4 | col5 |
zeta | eta | theta | iota | kappa |
lamda | mu | nu | xi | omikron |
pi | rho | sigma | tau | upsilon |
|