Connect to two databases.
#1

Hi,

I use blueg plugin. I connect to my server database, i want too connect to my website database, i just need to create another connection? queries don't bugg?
Reply
#2

They won't, but only if you specify the right connection handle to each and every plugin function.
Reply
#3

You don't need to connect your gamemode to your website... Connect the gamemode to your MySQL database and do the same with your website.

Gamemode -> Database
Website -> Database

Once your gamemode runs queries and your database gets updated it will automaticly update on your website as rows gets fetched.
Reply
#4

Quote:
Originally Posted by Zens
Посмотреть сообщение
You don't need to connect your gamemode to your website... Connect the gamemode to your MySQL database and do the same with your website.

Gamemode -> Database
Website -> Database

Once your gamemode runs queries and your database gets updated it will automaticly update on your website as rows gets fetched.
Which works if you are using the same database for both.
If you are using different databases on different hosts, it might be that easy.
If possible, you should always host your mysql db for the server on the same machine as the server is running ('localhost').
If you are running a website on another host (quite many are doing that) you would have to remotely call the server's DB each time the website needs some data. In addition if you e.g. use SMF or something similar, it's going to be cleaner if you use different databases.
So mixing a complete website's DB table with a complete server's DB table you might get a huge DB which needs to be remotely called by the website or the server (depending on your hosting obviously).
It could although help to save the few data you need from the website's DB in the server DB as well (if these are not data that are going to be changed permanently), or only there if it's not about some forum accounts or similar things.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)