 |
ต้องการที่จะเขียน Group by แต่ไม่รู้จะเขียนไว้ตรงไหนยังไงคะ ขอคำแนะนำด้วยคะ |
|
 |
|
|
 |
 |
|
ใส่ต่อไปเลยครับหลัง where
|
 |
 |
 |
 |
Date :
2011-03-03 16:12:01 |
By :
oasiis |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
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 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
"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:46:25 |
By :
heng |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|