"SELECT incident.technician,employee.firstname,employee.lastname,count(incident.incidentstatus_id) as status_approve,incidentstatus.incidentstatus_name FROM incident,incidentstatus,employee WHERE incidentstatus.incidentstatus_name='Wait Approve' and incident.incidentstatus_id=incidentstatus.incidentstatus_id and employee.employee_id =".$row_Recordset2['technician'];
แล้วจะเขียน group by ไว้ตรงไหนคะ
GROUP by incident.technician,incident.incidentstatus_id
employee.employee_id =".$row_Recordset2['technician'];
มันเชื่อมมาจากอีกอันนึงอ่ะคะ พอใส่ GROUP by incident.technician,incident.incidentstatus_id ต่อท้าย มัน Error..
Parse error: syntax error, unexpected T_STRING
"SELECT incident.technician,employee.firstname,employee.lastname,count(incident.incidentstatus_id) as status_approve,incidentstatus.incidentstatus_name FROM incident,incidentstatus,employee WHERE incidentstatus.incidentstatus_name='Wait Approve' and incident.incidentstatus_id=incidentstatus.incidentstatus_id and employee.employee_id =".$row_Recordset2['technician'] GROUP by incident.technician,incident.incidentstatus_id;
Date :
2011-03-03 16:32:00
By :
sas
No. 4
Guest
"SELECT incident.technician,employee.firstname,employee.lastname,count(incident.incidentstatus_id) as status_approve,incidentstatus.incidentstatus_name FROM incident,incidentstatus,employee WHERE incidentstatus.incidentstatus_name='Wait Approve' and incident.incidentstatus_id=incidentstatus.incidentstatus_id and employee.employee_id =".$row_Recordset2['technician']." GROUP by incident.technician,incident.incidentstatus_id";