View Source:
Help/SqlResultPlugin
Note:
This page has been locked and cannot be edited.
The **~SqlResult** [[Help:WikiPlugin|plugin]] displays results of arbitrary SQL select statements in table form. The database definition, the DSN, must be defined in the local file ##config/SqlResult.ini## A simple textfile with alias = dsn lines. Optional template file to format the result and handle some logic. Template vars: %%where%%, %%sortby%%, %%limit%% == Usage == {{{ <<SqlResult parameters SELECT statement >> }}} == Arguments == {| class="bordered" |- ! Argument ! Description ! Default value |- | **alias** | DSN database specification | false |- | **ordered** | if to display as {{{<ol>}}} list: single col only without template | false |- | **template** | use a custom {{{<theme>/template.tmpl}}} | false |- | **where** | custom filter for the query | false |- | **sortby** | for paging | false (no paging) |- | **limit** | for paging | 0,50 (only the first 50) |} == Examples == {{{ <<SqlResult alias=mysql SELECT 'mysql password for string "xx":', PASSWORD('xx') >> <<SqlResult alias=videos template=videos SELECT rating,title,date FROM video ORDER BY rating DESC LIMIT 5 >> <<SqlResult alias=imdb template=imdbmovies where||="Davies, Jeremy%" SELECT m.title, m.date, n.name, c.role FROM movies as m, names as n, jobs as j, characters as c WHERE n.name LIKE "%%where%%" AND m.title_id = c.title_id AND n.name_id = c.name_id AND c.job_id = j.job_id AND j.description = 'Actor' ORDER BY m.date DESC >> }}} == Author == * [[Help:Reini Urban|Reini Urban]] == See Also == <noinclude> ---- [[PhpWikiDocumentation]] [[CategoryWikiPlugin]] </noinclude>
Please enable JavaScript to view the
comments powered by Disqus.
HollenbackDotNet
Home Page
Popular Pages
All Categories
Main Categories
General Interest
Geek Stuff
DevOps
Linux Stuff
Pictures
Search
Toolbox
RecentChanges
RecentNewPages
What links here
Printable version
AllPages
RecentChanges
Recent Changes Cached
No changes found
Favorite Categories
ActionPage
(150)
WikiPlugin
(149)
GeekStuff
(137)
PhpWikiAdministration
(102)
Help/PageList
(75)
Help/MagicPhpWikiURLs
(75)
Blog
(69)
Pictures
(60)
GeneralInterest
(44)
LinuxStuff
(38)
Views
View Page
View Source
History
Diff
Sign In