I am trying to Merge several psets.
But to do that I think I need to have multiple databases.
My dumbest approach to that problem follows like this
in constants.php
define("DATABASE", "pset7");
define("DATABASE_One", "pset8");
// your database's password
define("PASSWORD", "123");
// your database's server
define("SERVER", "localhost");
// your database's username
define("USERNAME", "root");
date_default_timezone_set('Asia/Kolkata');
in functions.php function query(/* $sql [, ... ] */) {
// connect to database
$handle = new PDO("mysql:dbname=" . DATABASE . ";host=" . SERVER, USERNAME, PASSWORD);
}
function query1(/* $sql [, ... ] */)
{
// connect to database
$handle = new PDO("mysql:dbname=" . DATABASE_One . ";host=" . SERVER, USERNAME, PASSWORD);
}
I created exact copy of query() in that I changed dbname from DATABASE to DATABASE_One
I don't know whether it works or not but If you have correct or better approach please help me.
If possible suggestions on how to merge two psets will be much appreciated. I am thinking about about subfolders or subdomains approach.