hello everyone.
Information on how you solved the following scenario, then that is definitely a scenario used by many of you.
- web app shared by different customers.
- Database with tables common to all customers, database name: <appname>_admin (eg.: label_admin):
Ex: table ‘menu’, countries, provinces, other common tables (not editable by customers), sec_apps, sec_groups (of course, logically, the groups are the same for everyone), sec_groups_apps - Database data owners for each customer: table1, table2, … tablex, sec_users, sec_user_groups
All work properly in development, but in production can not work because the database connection ‘label_admin’ (declared in the FROM clause, see below) can not occur.
In OnValidate of app_login, change the connection to the customer’s database and event OnValidateSuccess app_Login in the active connection, of course, is that of the client:
$sql = “SELECT app_name,
priv_access,
priv_insert,
priv_delete,
priv_update,
priv_export,
priv_print,
group_id
FROM label_admin.sec_groups_apps <-------
WHERE group_id IN
(SELECT
group_id
FROM
sec_users_groups
WHERE
login = '”. [usr_login] ."’)";
sc_select(rs, $sql);
In production: error in the database connection label_admin (access denied to the user with the credentials to the database client)
the rest of the web app works correctly.
I have not encountered further problems or issues.
How do you solve the situation?
or
how you have developed a web app can be used by multiple customers with proprietary data and database with common tables?
I have now solved by duplicating the table sec_groups_apps in each customer’s database, but … it’s not a good thing. With each new form, grid, etc, you must update ‘remember’ to copy the table.
If I do not find a better solution will develop a small app to copy it automatically, but logic would require to use that common! 
Thank You.
Ciao!
enrico ferretti