error de query
This commit is contained in:
@@ -266,11 +266,13 @@ app.post('/datos_personales', async(req, res) => {
|
||||
|
||||
}
|
||||
if (body.magistral != undefined) {
|
||||
let ta = body.magistral;
|
||||
cad = `insert into asistencia values(null, ${id_persona}, ${ta.id_evento}, true, false , false , false, false, 'Asistente' );`;
|
||||
let n_q = await query(cad);
|
||||
cad = `update evento set cupo= cupo-1 where id_evento=${ta.id_evento};`;
|
||||
n_q = await query(cad);
|
||||
for (let i = 0; i < body.magistral.length; i++) {
|
||||
let ta = body.magistral[i];
|
||||
cad = `insert into asistencia values(null, ${id_persona}, ${ta.id_evento}, true, false , false , false, false, 'Asistente' );`;
|
||||
let n_q = await query(cad);
|
||||
cad = `update evento set cupo= cupo-1 where id_evento=${ta.id_evento};`;
|
||||
n_q = await query(cad);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user