SELECT `attendence`.`u_id` ,
DATE_FORMAT(date,'%d-%m-%Y') as `date`,
`attendence`.`checkin`,
`attendence`.`checkout`,
`users`.`firstname`,
`users` .`lastname`
FROM `attendence`
INNER JOIN `users` ON `attendence`.`u_id` = `users`.`u_id`
WHERE DATE_FORMAT( DATE, '%Y-%m' ) = '$combined' AND `u_id`='$u_id';
请帮助伙计们
当我删除 AND u_id
='#u_id 它可以工作但返回所有员工详细信息'