Can you use pages display data from another database?

mrb1972

Active member
Ok, im not a dev so this is probably a stupid question but would it be possible to create a page that shows data from another mysql database on the same webserver?
 
Thanks for the reply, thats interesting to know.. as you can probably guess I dont know what im doing ;)
All that would be required would be a PHP callback that connects to the other database, fetches the data and exposes it to the page as part of the view parameters.
 
Ok sounds interesting.. is it possible to also create an add-on in the admincp with allows you to add/edit/save the data to/from the other database?

The reason im asking is that the second database will have quite a lot of data (thousands of records) so im trying to decided if its better to
1. Have it in a seperate database with its own backend and pull it into a xenforo page
2. or Try to integrate it into xenforo as an add-on and put the data in the same database xenforo uses,

Which solution would be best performance wise? Im just trying to work out the best direction to take
 
I have a similar set up (database-wise) on my existing forum.
There are the usual forum tables and about 40 extra tables with several hundred thousand records.

I didn't notice any problems, performance related or otherwise, from doing it this way.
 
I have a similar set up (database-wise) on my existing forum.
There are the usual forum tables and about 40 extra tables with several hundred thousand records.

I didn't notice any problems, performance related or otherwise, from doing it this way.

ok, do you manage this extra data via an admincp add-on?
 
ok, do you manage this extra data via an admincp add-on?
Apologies, I should have clarified that my current set up uses phpBB (we're switching soon) so that part isn't applicable.

We will be reintegrating this second database at some point so I will decide then which way to go.
I'm leaning towards the same database again so we can make use of members, permissions, etc.
 
I would be interested in hearing some sample code from people in the know. Looks like it could be useful for website that are more data/stats oriented.
 
Hm, you would just need to create a second db connection.^^

I have only a vBulletin sample code atm http://www.vbulletin.com/forum/show...-2-widgets?s=175bc370086a420968c0a0c0a6448ae0
And i can't port this to xenforo, until i finish my cms

what do you all mean with an add-on?
Something like this: http://ragtek.org/blog/forumsoftwar...bulletin/news-rund-um-mein-oscommerce-widget/ (just check the form^^)
A add-on doesn't make sense, because everybody needs different stuff, and a add-on which is creating a acp page with a form for the database connection is IMHO useless without the queries, etc...
 
what do you all mean with an add-on?
Something like this: http://ragtek.org/blog/forumsoftwar...bulletin/news-rund-um-mein-oscommerce-widget/ (just check the form^^)
A add-on doesn't make sense, because everybody needs different stuff, and a add-on which is creating a acp page with a form for the database connection is IMHO useless without the queries, etc...

It would be custom add-on just for my needs - I would be able to manage the data from the second database, edit/add/delete records from the admincp etc, then be able to display that data in a xenforo page based on certain custom queries
 
Top Bottom