Additional database access on the wiki page

Ewgenij Sokolovski March 11, 2014

Hello, community. I'm just wondering what the proper way for that would be... The goal is to display a selection form on a confluence page to filter and display entries of a separate custom database table. I want to create a new table in the confluence database like

Harry 30 meat

John 25 vegetables

Jennifer 27 meat

And then I want to create a selection form on the confluence page where I could filter the table for a 25 years old person who likes vegetables :-) And show the results.

I thought about creating a new table in the confluence database, then embed some javascript/php on the confluence web page in question to access the table. Is that the right way? I'm quite new to confluence...

BR

Ewgenij

3 answers

1 accepted

3 votes
Answer accepted
Deividi Luvison
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2014

Hi Ewgenji,

Another idea for that end would be to create a page to store that information and then use something like the Confluence SQL plugin from Bob swift (which is a third party plugin).

I would avoid creating tables in Confluence database, since that kind of customization could cause some problems during upgrade or data restoration procedures.

Also this page might help you if you decide to play around Confluence database.

Thanks and Regards,
David|Atlassian Support
Ewgenij Sokolovski March 11, 2014

Hello, thank you for your answer, what do you mean by "to create a page to store that information"?

BR

Ewgenij

2 votes
Daniel Borcherding
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2014

Ewgenij

I'd just like to amplify David's point. The Confluence SQL macro allow you to query and display data from an external database. Your would add a new datasource to your Confluence instnace in the following manner.

https://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat

You wouldn't create a paget ostore that information, but an entirely new database. You could then use the SQL macro on a page of your chosing to display your desired information. To my knowledge you can't use a page in confluene as a datasource. I think David is trying to suggest decoupling the Confluence database and the new datasource to avoid problems during upgrade.

Ewgenij Sokolovski March 12, 2014

Hello Daniel, thank you. "Confluence SQL macro" you mean this plugin: https://marketplace.atlassian.com/plugins/org.swift.confluence.sql?Or something else?

0 votes
Ewgenij Sokolovski March 11, 2014

Do I understand it right, that I'm supposed to use the HTML Macro to embed javascript to a Confluence page? If so, I have to activate HTML Macros for all Confluence pages, and everybody with access to Confluence can put scripts on any page. Is that correct?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events