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.