The background here is that we use a SQL to run a diary and the following commands bring up the results from one specific SQL
if ($_SERVER['HTTP_HOST'] == "localhost") {
$GLOBALS['dbUsername'] = "admin";
$GLOBALS['dbPassword'] = "admin";
$GLOBALS['dbHost'] = "localhost";
$GLOBALS['dbDatabase'] = "Tracker";
}
else {
$GLOBALS['dbUsername'] = "admin";
$GLOBALS['dbPassword'] = "admin";
$GLOBALS['dbHost'] = "localhost";
$GLOBALS['dbDatabase'] = "store_3";
}
However we have around 26 of these using "store_1" - "store_26"
So to look through them all can take a while. I wanted to simply load multiple at the same time but my SQL + PHP knowledge is not that great
I thought that:
$GLOBALS['dbDatabase'] = "store_3";"store_4"
Would allow me to review more than 1 but this fails. The only other reference to dbDatabase
is slightly later in the code
$conn = mysql_connect($GLOBALS['dbHost'], $GLOBALS['dbUsername'], $GLOBALS['dbPassword']);
$data = mysql_select_db($GLOBALS['dbDatabase']);
So I am presuming if I log into multiple databases at the beginning I would also need a way to include them in this statement, any help would be much appreciated.