Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
0.50
About It:
Get it:
Rate it:
  • Helpful?
  • 9 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

smd_query

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:
Keywords/tags:
Initially released:
22 May 2008
Posted here:
22 May 2008

You know you want to visit the Archives.
Published with Textpattern