This is a bit of a complicated issue to explain but here goes: I have an SQL statement:
SELECT
SUM(time.timein),
time.reasonforabsence
WHERE
staff.id = time.staff_id
AND
staff.department_id = department.id
AND
(staff_name LIKE '%$staffsearch%')
GROUP BY
staff.id
ORDER BY
time.dateadded
ASC;
From this statement I need to pull the values time.reasonforabsence
but as this is text and the statement is grouped, I cannot seem to do this. Does anyone know if there is a way for me to pull them possibly into a PHP array.
The time.reasonforabsence
has multiple possible values.
Sorry for the vagueness I am writing this in a rush. Let me know if there is anymore info needed and I will add it tomorrow.