Loading...
 
Features / Usability

Features / Usability


SQL Plugin - how do I enable RAW data ?

posts: 4 US

I want to display the data the 'raw' output from a SQL query.

But no matter how or what I set raw to, the output is still in a formatted box

There are {SQL(db="xxx" 'raw return'="1")}select count(*) from activities{SQL} total tasks.

There are {SQL(db="xxx" raw="1")}select count(*) from activities{SQL} total tasks.

There are {SQL(db=xxx raw=1)}select count(*) from activities{SQL} total tasks.

There are {SQL(db=>xxx raw=>1)}select count(*) from activities{SQL} total tasks.


What am I doing wrong ?

posts: 212

You left out an important bit of information. What version of Tiki are you running?

All but the very first one ( 'raw return'="1") should have worked fine, but only if you were using Tiki version 11 or higher (I don't notice that mentioned in the plugin doc, but the "raw" option was added in version 11).

If your Tiki is a version before 11, you might be able to replace the sql plugin code with the code from version 11. I replaced /lib/wiki-plugins/wikiplugin_sql.php on version 9 with the code from version 11 and raw is working fine.

Tom


posts: 4 US

My bad .. 9.6

Time to talk to our Wiki admin about updating, or at least taking your suggestion about replacing just the module

Thanks

-pete