New DB connection on custom page
#1
Hello,

I have created a custom page (server-stats.php), the page works fine however I was wondering what's the best to open a new DB connection?

Thanks,
Reply
#2
you can include global.php file by using require_once function & MyBB's database can be queried through it ..
<?php
define('IN_MYBB', 1);
require_once "global.php";
// MyBB database can be accessed ... 
[MyBB database methods]
Reply
#3
(2020-02-02, 03:23 AM).m. Wrote: you can include global.php file by using require_once function & MyBB's database can be queried through it ..
<?php
define('IN_MYBB', 1);
require_once "global.php";
// MyBB database can be accessed ... 
[MyBB database methods]
I am already including global.php file (require_once) but im not looking to query anything inside of myBBs database I want to connect to a new different database 
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)