Additional database access on the wiki page

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

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

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

BR

Ewgenij

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.

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

899 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you