Not quite right, V@no.
Look:
We use users table from the first gallery, and we've prefix
4images1 for first gallery, and prefix
4images2 for the second, right?
- in config.php of the first gallery we have $table_prefix = "4images1_";
- in config.php of the second gallery we have $table_prefix = "4images2_";
So, if we call in constants.php in the second gallery for
define('SESSIONS_TABLE', '4images1_sessions');
define('SESSIONVARS_TABLE', '4images1_sessionvars');
define('USERS_TABLE', '4images1_users');
We will recieve mysql error, for script (second gallery) will search for
define('SESSIONS_TABLE', '4images2_4images1_sessions');
define('SESSIONVARS_TABLE', '4images2_4images1_sessionvars');
define('USERS_TABLE', '4images2_4images1_users');
Because in config of the second gallery we already put
$table_prefix = "4images2_"; and constats.php looks for
4images2_(its own prefix, defined in root config)
+4images1_bla-bla.
So, if we do in that way, we must not use table prefix for second gallery. Then it will search correctly for tables and find them
define('SESSIONS_TABLE', '4images1_sessions');
define('SESSIONVARS_TABLE', '4images1_sessionvars');
define('USERS_TABLE', '4images1_users');
Because there is no prefix in its own config.php.
Practically it is it. I thought for 3 or more galleries, but there is no way to do it in the similar way
Because each gallery, when calls for user table of the main gallery, adds its own prefix to path, and we get mysql error 116.. And only prefixless gallery finds right way for other user table.