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