While adding additional functionality to my search i am not able to fetch the correct start and end Date, always gives me back the first start and date of the first person in the table for every search and they should be different. (This happens while I search with department or borad), Am I doing something wrong with my query i don't know:
$query = "SELECT *
FROM tblperson
JOIN members
WHERE ".$persondepartment." like '%".$personboard."%'
AND members.personid = tblperson.personid
GROUP BY personname;";
And this is the results i get: Start Date and End Date should be different as in the database.
1. Results:
Name: HTC
Surname: China
Board: Evaluation
Department: Sales
Start Date: 2016-08-25 00:00:00
End Date: 2016-08-26 00:00:00
2. Results:
Name: Ilian
Surname: Ninka
Board: Executive
Department: Sales
Start Date: 2016-08-25 00:00:00
End Date: 2016-08-26 00:00:00