WebGUI
      Click here to register.
      
irc://irc.freenode.net#webgui

iPhoneGuy: WebGUI is a pile of crap.
rizen: If WebGUI is such a pile of crap, why do you use it?
iPhoneGuy: Because it's the best pile of crap out there.

If this is what people who hate us are saying, imagine what people who love us will say. Come join us on IRC.


     Report a Bug > WebGUI Bug Tracker

SQL Report doesn't support use prequery statement(s)

User zzois
Date 5/6/2008 9:31 am
Severity Minor (annoying, but not harmful)
Version WebGUI Beta 7.5.10
Views 40
Rating 1    Rate [
|
]
Karma Rank 0.000000
Previous · Next
User Message
zzois

The databaselink of the WebGUI database seems to not allow statement(s) with the 'set' keyword in them.

The hover help for input box of Prequery statements does not (explicitly) suggest otherwise, but might do so implicitly by giving example in its current form.

The allowed keywords (at the moment select, describe, desc, show and call) seem to be hardcoded in DatabaseLink.pm.

From reports of others on the forum:

http://www.webgui.org/etcetera/sql-report-how-to-use-prequery-statements

http://www.webgui.org/web_design_templates_and_themes/prequery-in-sql-report-doesnt-work

... it would seem that the same bug is present in all versions of WebGUI, including stable and beta versions.

Please could you be so kind and advise if set statements are left out from prequery functionality intentionally.



Back to Top
Rate [
|
]
 
 
zzois
I can reproduce this on http://beta.webgui.org

Back to Top
Rate [
|
]
 
 
Graham

Just allowing SET isn't something we can do, as there are many other functions that statement performs.  Allowing these based on a regex may be good, but it wasn't designed to do that initially.  Allowing SET\s+\@[^@] would probably work.

This isn't really a bug though.



Back to Top
Rate [
|
]
 
 
martink

Prequery stements arfe not hardcoded. They are hardcoded only for the default database link which is the actual WebGUI database. In all other database links you can specify the allowed keywords in the 'allowed keywords' field in the edit form of the db link.

The reason that you cannot change anything in the default db link is because changing stuff on it will cause webgui to fail and the restriction on its allowed keywords is there for security reasons.

If you need to use the SET keyword on the webgui database, you can create an additional db link to the webgui database, which does allow you to set the allowed keywords.

 

Closing as Not a bug.



Back to Top
Rate [
|
]