SQL Shortcode

This plugin allows you to embed SQL shortcodes on your WordPress posts and pages.

Author:Victor Barkalov (profile at wordpress.org)
WordPress version required:2.7.0
WordPress version tested:4.1
Plugin version:1.1
Added to WordPress repository:22-12-2014
Last updated:23-12-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://barkalov.com/
Total downloads:1 085
Active installs:200+
plugin download
Click to start download

This plugin allows you to embed SQL shortcodes on your WordPress posts and pages. This plugin allows you to embed SQL shortcodes on your WordPress pages. Put your SQL query inside shortcode [sql]...[sql] to print result as an HTML table. Put your SQL query inside shortcode [sqlvar]...[/sqlvar] to print result as a single value (e.g. total number of users).

STYLING THE OUTPUT

Style the output by adding any of the following shortcode attributes: cellpadding, cellspacing, border, style, tr_style, th_style, td_style.

CONNECTING TO A NON-WORDPRESS DATABASE

By default the query will be run again the WordPress database. If you need to connect to another database, add all of the following shortcode attributes: user, pass, host, db. If any of those attributes are not provided, the plugin will use the WordPress database.

ADVANCE OUTPUT TRANSFORMATION (XSL)

The [sql]...[sql] shortcode can have an optional nested shortcode [xsl]...[xsl]. Use the nested shortcode only if you wish to apply an additional XSL transformation to the TABLE output, e.g. if you need to introduce additional formatting not supported by the [sql] shortcode attributes, e.g. convert URLs into hyperlinks, etc.