Códigos utilizados:
============================================================================
EVENTO: onvalidatesuccess
$field = {login};
$sql = “select group_id from sec_users_groups where login = '” . $field . “’”;
sc_lookup(ds, $sql);
if ({ds[0][0]} == 2)
{
sc_change_connection(“conn_1”, “conn_2”);
}
elseif ({ds[0][0]} == 3)
{
sc_change_connection(“conn_1”, “conn_3”);
}
=================================================================
EVENTO: onScriptinit
{empresa} = $_SESSION[‘scriptcase’][‘form_products’][‘glo_nm_conexao’];
==================================================================
EVENTO: onScriptinit
if ({company} == 2)
{
sc_change_connection(“conn_mysql”, “conn_mysql_1”);
}
elseif ({company} == 3)
{
sc_change_connection(“conn_1”, “conn_3”);
}
=======================================================================