coneccion profesores

This commit is contained in:
xXpuma99Xx
2021-09-23 16:40:21 -05:00
parent 541e3fe964
commit 0f5698364f
+3 -3
View File
@@ -39,10 +39,11 @@ const obtenerProfesor = async (numeroCuenta) => {
});
return conn
.query(`SELECT * FROM profesor WHERE no_trabajador = ${numeroCuenta}`)
.query(`SELECT * FROM Profesor WHERE NumTrabajador = ${numeroCuenta}`)
.then((rows) => {
conn.end();
if (rows.length === 0) return null;
console.log(rows[0]);
return rows[0];
})
.catch((err) => {
@@ -53,5 +54,4 @@ const obtenerProfesor = async (numeroCuenta) => {
module.exports = { obtenerAlumno, obtenerProfesor };
// obtenerAlumno('316313528');
// obtenerProfesor('138158');
obtenerProfesor('138158');