ScrewTurn Wiki 4 Releases and News
Screwturn Compatible Hosting – Click Here for 3 Months Free!
G+ Twitter          Search: »
Amanuens
ScrewTurn Wiki
Image
Image
Version1.01 beta
Rating
DeveloperEzequiel Santamaria
UpdatedApril 30, 2010
HomepagePlugin Homepage
Works withScrewTurn Wiki v3.0.x
LicenseGNU GPL

More about this Plugin

SQL Table Formatter allows you to query a SQL Database of your choice from within the wiki using a wiki tag. and returning the result in a formatted table. This formatter was originally developed by Scott Clewell for ScrewTurn wiki V2 and later ported to ScrewTurn V3 by Ezequiel Santamaria.

Configuration

To use the provider, you will need to specidy a SQL connection string in order for the provider to become active. The way to create the string is as follows:

Data Source=[DB_SERVER];Initial Catalog=[DB_NAME];User ID=[DB_USER];Password=[DB_PASSWORD]

Usage

Wikitag: {QueryTable parameters...}QUERY{/QueryTable}

Parameters

Parameter Name -> Data Type
border-width -> integer
border-spacing -> integer
border-style -> string
border-color -> string
border-collapse -> string
background-color -> string
cell-border-width -> integer
cell-padding -> integer
cell-border-style -> string
cell-border-color -> string
cell-background-color -> string
noheaders
cell-font-color -> string
header-font-color -> string


Examples

Example 1

The following will select all fields from table USERS from a given database in the configuration section

{QueryTable}Select * FROM USERS{/QueryTable}

Example 2

The following selects the top 10 new pages (assuming that the SQL Storage provider is being used).
{QueryTable border-style="none" cell-border-style="none"}Select Top 10 '•' + Name As [10 Most Recent Pages] From Page Order By CreationDateTime desc{/QueryTable}

Example 3

Maths problems can be done withing the tags with the correct SQL syntax. The following returns the square root of 167

{QueryTable cell-border-style="none" border-style="none" noheaders}select sqrt(167){/QueryTable}

Help

If you have questions, please contact me on the wiki forum, as I check it regularly.

Updates

Updates to the formatter are currently on halt, but support is constant. I have received feedback from users asking if I could allow multiple connection strings and SQL variables to the SELECTS. Please if you're interested in this features, send me an email so I can evaluate how many people are actually looking forward for such features.



Discuss

No Messages for this Page. Be the first!

  Name Size
- Plugin.png 4.26 KB
- SQLTableFormatter.jpg 32.52 KB

Side Projects

  • RESX Synchronizer allows to synchronize multi-language .resx files (used for the development of ScrewTurn Wiki).
  • Pixel Picker enables to pick the color of pixels on your screen — very handy for day-to-day graphics-related activities.

About

  • Copyright ©2006-2012 Threeplicate Srl. All rights reserved. Some of the icons created by FamFamFam.
  • See our Privacy Policy.
  • Powered by ScrewTurn Wiki 3.0.5.613.
  • This namespace contains 45 pages.