0

我收到此错误:

Error Number: 2006
MySQL server has gone away

究竟是什么错误导致了这种错误?我尝试了一些建议,例如max_allowed_packet论坛中讨论的其他一些建议,但没有一个适合我的情况。这个查询有什么不标准甚至是错误的吗?

SELECT
    `st`.`stid`, 
    `st`.`shift`, 
    `start_date`, 
    `end_date`, 
    `off_date`, 
    `actual_off_date`, 
    `leave_type`, 
    `sd`.`off_day` 
FROM (`staff` as st) 
LEFT JOIN `staff_leave_period` as slp 
    ON `st`.`stid` = `slp`.`stid` 
    and start_date <= '2013-04-03' 
    and end_date >= '2013-04-03' 
LEFT JOIN `staff_off_dates` as sod 
    ON `st`.`stid` = `sod`.`stid` 
    and off_date = '2013-04-03' 
LEFT JOIN `staff_off_day` as sd 
    ON `st`.`stid` = `sd`.`stid` 
    and sd.off_day = 'Wed' 
JOIN `staff_leave_status` as sls 
    ON `sls`.`stid` = `st`.`stid` 
WHERE `st`.`stid` NOT IN (SELECT stid 
        FROM attendance 
        WHERE att_date = "2013-04-03"
4

0 回答 0