Pg
dbname=sica host=xalli
postgres
select materia, nivel, facultad, semestre from cursos where rfc='$rfc'
select nombre,inst from distinciones where (rfc='$rfc' and pub like 'S%')
select articulos.tipo_art,articulos.autor,articulos.autores,articulos.titulo,revistas.nom_rev,articulos.vol,articulos.pag_ini,articulos.pag_fin,articulos.fecha,articulos.anno where articulos.rfc='$rfc' and articulos.num_rev=revistas.id_rev;
select autores, titulo, edit, isbn from libros where rfc='$rfc'
select nombre,editores, titulo, autores2, edit, pags, periodo, isbn from capitulos_lib where rfc='$rfc'
select titulo,tipo_pat,registro from patentes where rfc='$rfc'
select alumnos.ap_alu,alumnos.nom_alu,inst_frh.nombre_inst,nivel_frh.nivel,frh_gral.titulo,frh_gral.fecha_final
where (frh_gral.rfc='$rfc')
and (frh_gral.tipo_part<3)
and (frh_gral.nivel>1)
and (frh_gral.nivel=nivel_frh.cla_niv)
and (frh_gral.id_alu=alumnos.id_alu)
and (frh_gral.inst=inst_frh.id)