Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a New Company
05-23-2014, 01:13 AM, (This post was last modified: 05-23-2014, 01:16 AM by serakfalcon.)
#5
RE: Creating a New Company
WebERP doesn't currently support database table prefixes. It's one of several ongoing things I'm looking into.

However, a workaround you could do, is this:
in config.php alter $DBUser & $DBPassword to be an arrays, with the key being the database they belong to.

so,
Code:
$DBUser = array(
    'weberp'=>'someuser',
    'weberp2'=>'anotheruser');
$DBPassword = array(
    'weberp'=>'somepass',
    'weberp2'=>'anotherpass');

And in includes/ConnectDB_mysqli.inc (assuming you're using mysqli, which you should be)

change line 17 to

Code:
$db = mysqli_connect($host , $DBUser[$_SESSION['DatabaseName']], $DBPassword[$_SESSION['DatabaseName']],$_SESSION['DatabaseName'], $mysqlport);

We'll have to do a more comprehensive solution in the future but that should work in your case.
Reply


Messages In This Thread
Creating a New Company - by grayryder - 11-23-2013, 10:37 AM
RE: Creating a New Company - by Exsonqu_Qu - 11-25-2013, 11:29 AM
RE: Creating a New Company - by grayryder - 11-26-2013, 07:13 AM
RE: Creating a New Company - by kcsr - 05-21-2014, 06:49 AM
RE: Creating a New Company - by serakfalcon - 05-23-2014, 01:13 AM
RE: Creating a New Company - by Exsonqu_Qu - 05-23-2014, 07:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)