[Moin-user] SQL Queries in Moin

Paul Moore pf_moore at yahoo.co.uk
Sun Oct 26 10:56:12 EST 2003

I'd like to be able to include the results of a database query in my
Wiki. Something along the lines of

[[SQL("select * from emp")]]

which generates a table containing the output of the query.

I'm assuming I'd probably have to write this myself, as I suspect that
there are too many variables for a general solution to work. If I
follow things correctly, this is a macro - is there any help on
writing macros available? I've searched the MoinMoin site, but can't
see anything (other than stuff in the MacroMarket that I can try to
learn from).

This is getting a bit away from "collaborative website" and more into
"web application" areas, so maybe MoinMoin isn't a good tool for this.
But frankly, looking at some of the web application tools around, I'd
much prefer to do this in Moin :-)

Some design issues spring to mind:

1. I need to get the username/password/database somewhere. Can I store
   them externally to the page, or am I better just adding 3 more
   parameters to the macro?
2. As I'm getting data from the database, it might be nice to password
   protect the page. Is there any sort of Moin or Apache trick to
   require authentication on particular Wiki pages?
3. Should I do this some other way altogether?

Any help would be appreciated.

This signature intentionally left blank

More information about the Moin-user mailing list