I'm not sure if this is the right place, I'll just give it a shot though.
I have a MyBB forum set-up with a MySQL database connected with the website control panel. However, I'd like to know if it's possible to somehow connect another MySQL database to my website. It's from my game server, and I'd like to post statistics of the players, their currency, experience and so on. Is this possible in any way?
I figured that it is possible, however I'd like to know how I can connect to the secondary game database on the /index.php page.
I've finally managed to connect to the game server database. However I'm struggling with the placement on the index page. How do I save the functions like this:
//execute the SQL query and return records
$result = mysql_query("SELECT steamid, balance FROM uconomy LIMIT 3");
//fetch tha data from the database
while ($row = mysql_fetch_array($result)) {
echo "ID:".$row{'steamid'}." Name:".$row{'balance'}."Year: "."<br>"; //stats
}
into a $uconomy function to be posted on the html template?
I have a MyBB forum set-up with a MySQL database connected with the website control panel. However, I'd like to know if it's possible to somehow connect another MySQL database to my website. It's from my game server, and I'd like to post statistics of the players, their currency, experience and so on. Is this possible in any way?
I figured that it is possible, however I'd like to know how I can connect to the secondary game database on the /index.php page.
I've finally managed to connect to the game server database. However I'm struggling with the placement on the index page. How do I save the functions like this:
//execute the SQL query and return records
$result = mysql_query("SELECT steamid, balance FROM uconomy LIMIT 3");
//fetch tha data from the database
while ($row = mysql_fetch_array($result)) {
echo "ID:".$row{'steamid'}." Name:".$row{'balance'}."Year: "."<br>"; //stats
}
into a $uconomy function to be posted on the html template?