1 Date: Thu, 9 Dec 2010 19:59:28 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0)
3 Content-Type: application/x-phpwiki;
4 pagename=Help%2FSqlResultPlugin;
8 Content-Transfer-Encoding: binary
10 The **~SqlResult** [[Help:WikiPlugin|plugin]] displays results of arbitrary SQL select statements in table form.
12 The database definition, the DSN, must be defined in the local file ##config/SqlResult.ini##
14 A simple textfile with alias = dsn lines.
16 Optional template file to format the result and handle some logic.
18 Template vars: %%where%%, %%sortby%%, %%limit%%
22 <<SqlResult parameters
36 | DSN database specification
40 | if to display as {{{<ol>}}} list: single col only without template
44 | use a custom {{{<theme>/template.tmpl}}}
48 | custom filter for the query
57 | 0,50 (only the first 50)
63 <<SqlResult alias=mysql
64 SELECT 'mysql password for string "xx":',
68 <<SqlResult alias=videos template=videos
69 SELECT rating,title,date
75 <<SqlResult alias=imdb template=imdbmovies where||="Davies, Jeremy%"
76 SELECT m.title, m.date, n.name, c.role
77 FROM movies as m, names as n, jobs as j, characters as c
78 WHERE n.name LIKE "%%where%%"
79 AND m.title_id = c.title_id
80 AND n.name_id = c.name_id
81 AND c.job_id = j.job_id
82 AND j.description = 'Actor'
88 * [[PhpWiki:ReiniUrban|Reini Urban]]
94 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]