Connecting to external sql for table content

Permalink
Good evening,

We had a MySQL database on our old website that we used to store archived podcasts and detailed information about them (dates, title images, attachments, run time, guest speaker, topic, audio file location, etc) for staff archival purposes. I desperately want to figure out/learn a way to make that content available in a new way in C5, but I have had little luck finding an add-on, nor do I expect to.

What I am currently looking to do, and hope someone has done something like this before, is proved a stop-gap solution until I figure out what the permanant solution is. We have a media provider and streaming service, but it is fairly new, and our archive goes back 15 years in the form of bi-weekly messages. That's a lot of data.

I want to insert my php code to my old mySQL DB and display the contents in a block in C5. So far, the html block hasn't helped me, but maybe it is expecting the code to be laid out differently.?.

Does anyone have any thought on pulling remote SQL data and placing it into a C5 block (preferably without writing custom code :) )?

thanks

 
hutman replied on at Permalink Reply
hutman
Here is a really helpful article on accessing a second database, however you will have to write some custom code, I don't think there will ever be an add-on to do this for you because the fields in your custom database will be different for each user.

https://documentation.concrete5.org/developers/database-management/c...

If you need some dummy code for creating a custom block using this method just ask and I can provide it to you.
Gondwana replied on at Permalink Reply
Gondwana
I've had more luck with the php block for php code:
https://www.concrete5.org/marketplace/addons/php-code-block...

You could also consider importing your old database tables into your c5 database, as a custom block would do. This would sidestep the complexities associated with multiple tables.