我需要你的帮助。当我如下所述运行查询时,我正在获取MySQL“错误2013:丢失的连接”。我正在使用服务器v8。
SELECT CONCAT(UCASE(LEFT(tblpatients.Lname,1)), LCASE(SUBSTRING(tblpatients.Lname,2))) as lname, CONCAT(UCASE(LEFT(tblpatients.mi,1)), LCASE(SUBSTRING(tblpatients.mi,2))) as mi,
CONCAT(UCASE(LEFT(tblpatients.fname,1)), LCASE(SUBSTRING(tblpatients.fname,2))) as fname, tblpatients.PhoneNum as PhoneNum,
DATE_FORMAT(tblpatients.Bday,'%m/%d/%Y')as Bday, TIMESTAMPDIFF(YEAR, Bday,CURDATE()) AS pxage,
tblpatients.PatientID as PatientID, DATE_FORMAT(tblobgyne.obgyneDate,'%m/%d/%Y') as obgyneDate, TIME_FORMAT(tblobgyne.obgyneTime, '%h:%i%p') as obgyneTime,
tblparity.ParityID, tblobgyne.OBGyneID, tblobgyne.chiefcomplain, tblobgyne.companyname as companyname,
CONCAT(UCASE(LEFT(tblparity.pxservice,1)), LCASE(SUBSTRING(tblparity.pxservice,2))) as pxservice
FROM tblpatients
JOIN tblparity ON tblpatients.PatientID = tblparity.PatientID
JOIN tblobgyne ON tblparity.ParityID = tblobgyne.ParityID
WHERE obgyneDate >= 03-20-2019 ORDER BY obgyneTime ASC;