MyBB Community Forums

Full Version: Multi Database Users on 1 Database script not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Quote:<?php
/**
* Daatabase configuration
*/

$dbusers = array(
array('user' => 'ACCOUNT-ONE', 'password' => 'Password')
, array('user' => 'ACCOUNT-TWO', 'password' => 'Password')
, array('user' => 'ACCOUNT-THREE', 'password' => 'Password')
, array('user' => 'ACCOUNT-FOUR', 'password' => 'Password')
, array('user' => 'ACCOUNT-FIVE', 'password' => 'Password')
);
$mysql_user = $dbusers[rand(0, count($dbusers) - 1)];

$config['type'] = 'mysql';
$config['hostname'] = 'localhost';
$config['username'] = $mysql_user['user'];
$config['password'] = $mysql_user['password'];
$config['database'] = 'DATABASE_NAME';
$config['table_prefix'] = 'mybb_';

I had this in my old 1.2 site but it doesn't appear to work with 1.4

The site won't load entirely when used.

Does anyone see a problem or know a solution?

Thanks