1 Date: Wed, 4 Mar 2015 14:20:06 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
3 Content-Type: application/x-phpwiki;
4 pagename=Help%2FSqlResultPlugin;
7 Content-Transfer-Encoding: binary
9 The **~SqlResult** [[Help:WikiPlugin|plugin]] displays results of arbitrary SQL select statements in table form.
11 The database definition, the DSN, must be defined in the local file ##config/SqlResult.ini##
13 A simple textfile with alias = dsn lines.
15 Optional template file to format the result and handle some logic.
17 Template vars: %%where%%, %%sortby%%, %%limit%%
21 <<SqlResult parameters
35 | DSN database specification
39 | if to display as {{{<ol>}}} list: single col only without template
43 | use a custom {{{<theme>/template.tmpl}}}
47 | custom filter for the query
56 | 0,50 (only the first 50)
62 <<SqlResult alias=mysql
63 SELECT 'mysql password for string "xx":',
67 <<SqlResult alias=videos template=videos
68 SELECT rating,title,date
74 <<SqlResult alias=imdb template=imdbmovies where||="Davies, Jeremy%"
75 SELECT m.title, m.date, n.name, c.role
76 FROM movies as m, names as n, jobs as j, characters as c
77 WHERE n.name LIKE "%%where%%"
78 AND m.title_id = c.title_id
79 AND n.name_id = c.name_id
80 AND c.job_id = j.job_id
81 AND j.description = 'Actor'
87 * [[Help:Reini Urban|Reini Urban]]
93 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]