The right func breake it, other func also but at least it works
Posted: 2024-02-22 13:15
CONTEXT:
Will add manualy a record after the login_ok, After the partial success and total failure I GET ERROR500, the insert works nice in phpadmin and also using the wrong func it ADDS a record but the right func does noting at all. Code Bellow:
function login_ok($memberInfo, &$args) {
///This sends an email it works nicely
$timeTasks=sqlValue("SELECT SUM(minuesti) FROM tareas WHERE tareas.cip='1' AND tareas.estado='Activo' AND DATE(tareas.fechaini) = CURDATE()");
mail(
'aalain@???.com',
'Entrada al sistema exitosa, dentro veras los segundos pendientes' ,
'Tienes un total de: ' . $timeTasks . ' segundos pendientes.' ,
"From: tachasserver@???\r\n"
);
///This works adding the record (I know this is not the right func but at least it adds the record, then breaks
$anade=sqlValue("INSERT INTO tareas (detalle, fechaini, fechafinal, cip, estado, minuesti, tipo) VALUES ('macarron', '$fecha_actual', '$fecha_actual', 1, 'Activo', 88, 'Recu')");
///This is supposed to be the right func, it just breaks the system
sql("INSERT INTO tareas (detalle, fechaini, fechafinal, cip, estado, minuesti, tipo) VALUES ('macarron', '$fecha_actual', '$fecha_actual', 1, 'Activo', 99, 'Recu')");
return '';
}
Will add manualy a record after the login_ok, After the partial success and total failure I GET ERROR500, the insert works nice in phpadmin and also using the wrong func it ADDS a record but the right func does noting at all. Code Bellow:
function login_ok($memberInfo, &$args) {
///This sends an email it works nicely
$timeTasks=sqlValue("SELECT SUM(minuesti) FROM tareas WHERE tareas.cip='1' AND tareas.estado='Activo' AND DATE(tareas.fechaini) = CURDATE()");
mail(
'aalain@???.com',
'Entrada al sistema exitosa, dentro veras los segundos pendientes' ,
'Tienes un total de: ' . $timeTasks . ' segundos pendientes.' ,
"From: tachasserver@???\r\n"
);
///This works adding the record (I know this is not the right func but at least it adds the record, then breaks
$anade=sqlValue("INSERT INTO tareas (detalle, fechaini, fechafinal, cip, estado, minuesti, tipo) VALUES ('macarron', '$fecha_actual', '$fecha_actual', 1, 'Activo', 88, 'Recu')");
///This is supposed to be the right func, it just breaks the system
sql("INSERT INTO tareas (detalle, fechaini, fechafinal, cip, estado, minuesti, tipo) VALUES ('macarron', '$fecha_actual', '$fecha_actual', 1, 'Activo', 99, 'Recu')");
return '';
}