Loading...
 
Skip to main content

Features / Usability


SQL issue with concat in WiKi

posts: 13 US

This statement works with no issue in phpAdmin and in a Wiki page
\{SQL(db="myDSN" wikiparse="1" )\}select Hull,USCG,
'Hull Nbr ', Hull,' - SV ',BoatName, '', OwnerName
from HullInfo where current = 'x' LIMIT 0, 5 \{SQL\}

This statement work fine in phpAdmin but produces an error when saving in Tiki Wiki page
\{SQL(db="myDSN" wikiparse="1" )\}select Hull,USCG,
CONCAT('Hull Nbr ', Hull,' - SV ',BoatName, ''), OwnerName
from HullInfo where current = 'x' LIMIT 0, 5 \{SQL\}

Error message:
Forbidden

You don't have permission to access /tiki/tiki-editpage.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

any thoughts?

note: used \ to escape the syntax so the coding would display

thanks

- pat

posts: 3665 United States

Permission errors tend to be related to mod_security settings on the server. Check with your host for details.

You should check the server logs for details, too. I'm guessing that the 404 error is because you dont have a proper 403.shtml (or similar) file defined.

HTH,

- Rick | My Tiki Blog | My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.

posts: 13 US

Thank you for the reply. My server host removed the mod_security settings that were preventing the page from saving.

Now I know for certain that the it is not parsing the link correctly.

 Plugin disabled
Plugin sql cannot be executed.


produces
http://pearson424.org/tiki/tiki-index.php?page=test+2

Any thoughts on where I have not set something correctly?

posts: 215

The wiki parse option was added to the SQL plugin in Tiki version 11, and you are running Tiki version 9.

Tom

posts: 215
I took the SQL plugin code from a Tiki 12 site, and replaced the SQL plugin on a Tiki 9 site, and it appears to work OK. So if you don't want to upgrade your Tiki 9, you could consider doing that as an option to get it to work.
posts: 13 US

Works perfectly!

thanks


posts: 13 US

well that would make a difference. thank you for the info.

- pat