Not a developer? Go to MovableType.com

Plugin and Theme Directory

SQL v2.0

By Brad Choate
Posted November 30, 2002, in MT Tags, Templates, Widgets.

Details

The MTSQL tag can use SELECT statements like MySQL and PHP statements can.

<MTSQLEntries query="select entry_id from mt_entry
where entry_title like '%Movable Type%'">
<a href="<MTEntryLink>"><MTEntryTitle></a><br />
</MTSQLEntries>

Compatibility

Movable Type versions: 4.3


Back

10 Comments

linh.myopenid.com on June 24, 2008, 4:11 p.m. Reply

SQL is installed on MT 4.1. When ran with a simple query, nothing is returned, and there are
no errors or messages in the apache log files. Is this plugin compatible with 4.1? Thanks, - l -

Unicorn Ninja on December 24, 2008, 6:44 a.m. Reply

This might be the most useful plugin for MT yet. For someone attempting to highly customize a blog, this is extremely helpful. Thank you!

Drazend on January 3, 2009, 3:20 a.m. Reply

I installed this plugin on MT 4.2 and I get this:

“Cannot call method ‘cfg’ on object ‘MT::ObjectDriver::Driver::Cache::RAM=HASH(0x886dcfc)’ at /xxxxxxx/extlib/bradchoate/sql.pm line 602 “

Any idea what might be wrong?

Drazend on January 3, 2009, 3:45 a.m. Reply

Problem resolved by updating to SQL plugin 2.0 (had V 1.5).

Diana Schnuth on January 4, 2009, 4:26 p.m. Reply

I attempted to use a less-than in a where clause in a query (entry _ authored _ on < ‘[MTEntryDate format_name=’iso8601’]’), and discovered that the plugin gave me SQL syntax errors until I changed the < symbol to the & l t ; HTML escape character.

Just wanted to document that here, in case anyone else came across the same problem.

Bobb Menk on May 16, 2009, 7:37 a.m. Reply

Can anyone confirm if this plugin actually works with MT 4.2.3 with an Oracle backend?

Initial tests indicated that the plain MTSQL tag would work and that we could then use regular MT tags like MTEntry inside the MTSQL enclosure to display results. However right now we’re having trouble even with that, so I’m hoping to get a definitive answer.

We know the queries work using other tools to run them against the MT db, and we’re not getting any syntax errors from the templates, so I’m trying to determine if it’s the plugin itself or something outside of it.

Thanks for any light anyone can shed on this.

Bobb Menk on May 18, 2009, 12:36 p.m. Reply

Having worked on this a bit more, it now appears that with an Oracle backend, this plugin is limited to just the use of the MTSQL tag itself and the MTSQLColumn tag within that container. Regular MT tags do not appear to work, nor do the variants supplied by the plugin such as MTSQLEntries, etc. work.

It would be nice to be proven wrong on this, as it reduces the flexibility of the plugin significantly, but so far, that’s all we’ve been able to make it do.

Sunil Shrestha

Sunil Shrestha on August 26, 2016, 11:53 a.m. Reply

It works.

192.168.1.1

Naomi Stalenberg

Naomi Stalenberg on May 4, 2017, 11:06 a.m. Reply

Assignment writing help writers SQL is, as toby says, “preferred question language” wherein it’s miles a set of common sense based instructions used in querying datasources. It’s truly “structured query language” through the way, shhh! It isn’t always a programming language, as wamsie says. Sql. Is regularly utilized in programming, but to mention it’s far a programming language is inaccurate, it is not. Wamsie you actually need to test your reaction out on this… It is able to carry out responsibilities but that doesnt make it an software.

Besides, “Sql” is usually matters… It’s far a sort of server and it is a language for handling statistics, often also held in those servers, however this is not absolutely neces

Leave a Comment