Page 1 of 1

Joomla 4 Display external MySQL table in Article

Posted: Fri Sep 17, 2021 10:30 am
by denburydays
Attempting to connect and display within an A ??? rticle an external mysql table. This was achieved successfully in Joomla 3 by creating a 'Wrapper' Module then using 'Advanced Module Manager' to display it within Article (via SP Page Builder). This worked fine in Joomla 3 but now I cannot do this in Joomla 4. Have tried all sorts of methods without success. The 'Wrapper' Module in Joomla 4 only basic 'stuff'
Can someone suggest a method in Joomla 4.

Re: Joomla 4 Display external MySQL table in Article

Posted: Sat Sep 18, 2021 6:34 am
by pe7er
Welcome to Joomla forum!

Maybe you could create a simple Joomla 4 Module:
https://docs.joomla.org/Special:MyLangu ... ple_Module

In Joomla 3 you can display a module in an article. I suppose that you can do something similar in Joomla 4. I don't use SP Pagebuilder and do not know if it supports this Joomla core functionality of displaying a module in an article.
https://docs.joomla.org/How_do_you_put_ ... article%3F

Re: Joomla 4 Display external MySQL table in Article

Posted: Sat Sep 18, 2021 8:34 am
by ceford
Your question needs clarification. What exactly do you mean by external MySQL table? Are you trying to display the content of a table from your own site database? Or are you fetching content from a remote MySQL database? Or just content from a remote site? The Wrapper menu item and the Wrapper module both create an Iframe - you need to configure one or other with the remote url. The module can be included in an article (although I have not used this particular module so can't confirm it works).

Re: Joomla 4 Display external MySQL table in Article

Posted: Sat Sep 18, 2021 8:36 am
by Per Yngve Berg
Cannot you use Custom Fields that have been available since 3.9?

Re: Joomla 4 Display external MySQL table in Article

Posted: Sat Sep 18, 2021 8:49 am
by ceford
I tried out the wrapper module and can confirm it works fine. In the module, set a url and some other suitable parameters such as height. Type in a name for the module position, example: inhouse

Then in your article place the call where you want the wrapper to appear like this:

<div>{loadposition inhouse}</div>

Re: Joomla 4 Display external MySQL table in Article

Posted: Sat Sep 18, 2021 10:00 am
by denburydays
Per Yngve Berg wrote: Sat Sep 18, 2021 8:36 am Cannot you use Custom Fields that have been available since 3.9?
Thanks - I can successfully in Joomla 3 but not Joomla 4

Re: Joomla 4 Display external MySQL table in Article

Posted: Sun Sep 19, 2021 8:51 am
by denburydays
Thanks for everyones help and advise. I finally solved the problem by completely uninstalling Joomla 4 then reinstalling (Joomla 4.03). This seems to have solved my problem.