Redirect
Posted: Wed Mar 24, 2021 4:44 am
Hi,
I have a browse form which uses this custom SQL.
When I click one entry I want it to redirect to "Employees" form with the emplyee_id.
However the employee id does not link correctly.
SELECT
certificate.certificate_expiry,
DATEDIFF(certificate_expiry,curdate()),
cert_type.cert_name,
employee.emp_name,
certificate.certificate_type_id,
FROM
certificate
JOIN cert_type ON cert_type.cert_type_id = certificate.certificate_type_id
JOIN employee ON employee.employee_id = certificate.employee_id
WHERE NOT certificate_expiry = DATE('0000-00-00') AND employee.emp_active = 1 AND DATEDIFF(certificate_expiry,curdate()) < 61
ORDER BY DATEDIFF(certificate_expiry,curdate()) ASC
I have a browse form which uses this custom SQL.
When I click one entry I want it to redirect to "Employees" form with the emplyee_id.
However the employee id does not link correctly.
SELECT
certificate.certificate_expiry,
DATEDIFF(certificate_expiry,curdate()),
cert_type.cert_name,
employee.emp_name,
certificate.certificate_type_id,
FROM
certificate
JOIN cert_type ON cert_type.cert_type_id = certificate.certificate_type_id
JOIN employee ON employee.employee_id = certificate.employee_id
WHERE NOT certificate_expiry = DATE('0000-00-00') AND employee.emp_active = 1 AND DATEDIFF(certificate_expiry,curdate()) < 61
ORDER BY DATEDIFF(certificate_expiry,curdate()) ASC