Where is $db_server defined?

121 views
Skip to first unread message

Ap.Muthu

unread,
Nov 9, 2013, 8:47:58 AM11/9/13
to Justin James Kelly, SI Group
Line 11 in include/reportlib.php:

$db_server=substr($config->database->adapter, 4);

but is not used for normal urls in SI.

Where is $db_server defined and why is it all over the place being declared
as a global variable.
If it has "mysql" as it's value, then what happens to the normal PDO-MySQL
connection?

Regards,
Ap.Muthu

Justin Kelly

unread,
Nov 11, 2013, 12:22:13 AM11/11/13
to Ap.Muthu, SI Group
i had assumed it was defined in the include/init.php file - rather than the reportlib
- feel free to move or fix this up

is just used when the sql is going to write alternate sql for the various dbs
- a time ago there were SI uses very interested in postgre

Ap.Muthu

unread,
Nov 11, 2013, 1:31:59 AM11/11/13
to Justin Kelly, SI Group
In it's current form with exclusive use of pdo_mysql statements, pgsql and sqlite may not work at all.
Can the pgsql and sqlite code be removed along with the #db_server variable?
----- Original Message -----
From: Justin Kelly
Sent: Monday, November 11, 2013 10:52 AM
Subject: Re: Where is $db_server defined?

i had assumed it was defined in the include/init.php file - rather than the reportlib
- feel free to move or fix this up

is just used when the sql is going to write alternate sql for the various dbs
- a time ago there were SI uses very interested in postgre

Justin Kelly

unread,
Nov 11, 2013, 6:47:59 AM11/11/13
to Ap. Muthu, SI Group

Re pgsql sqlite
This is not fully functioning bit would like to keep it in as would like si to have multi database ability

Reply all
Reply to author
Forward
0 new messages