Package version/links:
pmwiki-2.2.5
Skin - pmwiki
txtdb-2.2.0-alpha-6-20100212
Txtdb - Sql query using txtdb directives
- Data source in Csv in wikipage and 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 |
| alpha | beta | gamma | delta | epsilon |
|
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:)
(:sortable:)
|
- 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:)
(:sortable:)
|
| id | keyword | english | french | german | spanish |
| 5 | Edit | Edit | Éditez | Redigieren Sie | Corrija |
| 8 | Delete | Delete | Suppression | Löschung | Cancelación |
| 9 | Save | Save | Sauf | Außer | Reserva |
| 10 | 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 :)
(:sortable:)
|
| col1 | col2 | col3 | col4 | col5 |
| alpha | beta | gamma | delta | epsilon |
| zeta | eta | theta | iota | kappa |
| lamda | mu | nu | xi | omikron |
|