Gossamer Forum
Home : Products : DBMan : Discussions :

how to open 2 non related databases

Quote Reply
how to open 2 non related databases
I inserted this in the default.cgi

sub switch_to_miembros
{
#-----------------------------------------------------
$cols = 'ID,Date,Email,Nombre,Nombre2,Apellido,Apellido2,Casada,Folio,Tomo,Asiento,Residencia,Oficina,Celular,Posicion,Posicion2,Posicion3,Remuneracion,Experiencia,Sector,Sector2,Estudios,Idiomas,Idiomas2,Confidencial,Confidencial1,Confidencial2,Confidencial3,Userid,Ubicacion,Ubicacion2,Dia,Mes,Ano ,RecibirMail,Computadoras,Programas,Programas2,Programas3';

@db_cols = split (/,/,$cols);
$db_file_name = $db_script_path . "/inscribir/yep/miembros.db";
}
sub switch_to_vacantes
{
#-----------------------------------------------------
$cols = 'ID,Date,Email,Empresa,Sexo,Posicion,Remuneracion,Experiencia,Sector,Estudios,Idiomas,Idiomas2,Confidencial,Userid,Ubicacion,Computadoras,16,17,18,19';
@db_cols = split (/,/,$cols);
$db_file_name = $db_script_path . "/registro/yep/vacantes.db";
$db_key_pos = 0;
}

and this to the html.pl in the sub html_record {


# Tell DBMan which database to look in
&switch_to_miembros;
# Get the associated record
%rec2 = &get_record($rec{'Userid'});
# Tell DBMan to go back to the original database
&switch_to_vacantes;
and between the print qq this
$rec{'Idiomas'}
 $rec2{'Userid'}
  $rec{'Idiomas2'}

what im tring to do is to open the miembros database to call its values but there is no relation between the two databases here is how it works...

the vacantes database is created by companies that have their own password file and its accesed by the users password file...

we are already logged in the vacantes database or vacantes.db but we also want to open the miembros.db and call the values of the user actually loged in the vacantes database

if yo can see any mistake please let me know, its truning me crazy this relation...



Subject Author Views Date
Thread how to open 2 non related databases Demente 4547 Jun 3, 2000, 10:45 AM
Thread Re: how to open 2 non related databases
JPDeni 4437 Jun 3, 2000, 12:27 PM
Thread Re: how to open 2 non related databases
Demente 4424 Jun 3, 2000, 1:22 PM
Thread Re: how to open 2 non related databases
JPDeni 4424 Jun 4, 2000, 3:09 AM
Thread Re: how to open 2 non related databases
Demente 4426 Jun 5, 2000, 1:01 PM
Post Re: how to open 2 non related databases
JPDeni 4406 Jun 5, 2000, 2:55 PM