Content last modified Monday 5 September 2016
hop to #bottom
Current version:
About It:
Get it:
Rate it:
  • Helpful?
  • 8 Yes
  • 0 No
Flag it:
Contact Reason [ ? ]


If you ever get the urge to just dive into the TXP database and run an SQL query to do stuff, this could be the ticket. It’s a halfway house between the existing TXP tags/plugins and writing PHP directly. If you know SQL syntax, you can use this plugin as it allows you to run pretty much any SQL query you like and parse each row, one by one, via a form (or using the plugin as a container tag). Pagination is supported via the txp:newer and txp:older tags or your own custom paging.

In true smd_ fashion you can specify that any input strings to the SQL queries are read from the current article, file or link fields, or from a <txp:variable /> or even the URL line (subject to obvious security implications which the plugin tries to minimise out of the box, and also allows you to tweak your own security rules). You can help your queries degrade gracefully with default variables and use <txp:else /> in the event an entire query returns nothing.

Use it wisely — carefully — and it might just touch the parts other plugins cannot reach, but if you try writing to the database and it turns to spaghetti, it wasn’t me. Honest.

Article Request Count:
Initially released:
22 May 2008
Posted here:
22 May 2008
Article modified:
31 Aug 2010

If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.