ERROR Facultyprofiles!!! select (CASE WHEN (t1.mname is null) THEN t1.fname ELSE CONCAT(t1.fname, ' ', t1.mname) END) AS FirstName, t1.lname AS LastName, t1.degree AS Degree, t2.semail AS Email, t1.staffid AS StaffID, (CASE WHEN( (t2.ptitle is null) OR (t2.ptitle = '') ) THEN t3.title ELSE t2.ptitle END) AS Title, (CASE WHEN ((ds.devalue is not null) OR (ds.devalue <> '')) THEN ds.devalue WHEN (ds.devalue is not null AND (ds.destopz <= CURDATE())) THEN '' WHEN (t1.fname is not null AND t1.lname is not null) THEN '' ELSE 'Unexpected Error' END) AS FacultyProfileLink, ds2.devalue AS Specialty, ds3.devalue AS ProfileImage, ds4.devalue AS Department, t2.sphone AS Phone,t3.title AS Title2, ptitle FROM allstudy.asstudy t2, allstudy.aslkup_title t3, allstudy.aspass t4, allstudy.aspage_display_eav pd, allstudy.asdemog t1 LEFT JOIN allstudy.asdemogsub_eav ds ON ds.staffid=t1.staffid AND ds.detypeid=2 AND (ds.destartz <= CURDATE() AND (ds.destopz > CURDATE() OR ds.destopz is null OR ds.destopz='')) LEFT JOIN allstudy.asdemogsub_eav ds2 ON ds2.staffid=t1.staffid AND ds2.detypeid=1 AND (ds2.destartz <= CURDATE() AND (ds2.destopz > CURDATE() OR ds2.destopz is null OR ds2.destopz='')) LEFT JOIN allstudy.asdemogsub_eav ds3 ON ds3.staffid=t1.staffid AND ds3.detypeid=3 AND (ds3.destartz <= CURDATE() AND (ds3.destopz > CURDATE() OR ds3.destopz is null OR ds3.destopz='')) LEFT JOIN allstudy.asdemogsub_eav ds4 ON ds4.staffid=t1.staffid AND ds4.detypeid=4 AND (ds4.destartz <= CURDATE() AND (ds4.destopz > CURDATE() OR ds4.destopz is null OR ds4.destopz='')) WHERE (t1.staffid=t2.staffid and t1.staffid=t4.staffid and t3.id=t2.stitle AND t2.study='PSYCH' AND t1.emstatus=1 AND pd.staffid=t1.staffid AND pd.study='PSYCH' AND pd.pageid=1 AND (pd.pastartz <= CURDATE() AND (pd.pastopz >= CURDATE() OR pd.pastopz is null OR pd.pastopz=''))) ORDER BY t1.lname, t1.fname
Error Number: 256 ERROR!!! Failed to retrieve data in getAdditionalEmails due to Query Error: DB Error: unknown error Query: select (CASE WHEN (t1.mname is null) THEN t1.fname ELSE CONCAT(t1.fname, ' ', t1.mname) END) AS FirstName, t1.lname AS LastName, t1.degree AS Degree, t2.semail AS Email, t1.staffid AS StaffID, (CASE WHEN( (t2.ptitle is null) OR (t2.ptitle = '') ) THEN t3.title ELSE t2.ptitle END) AS Title, (CASE WHEN ((ds.devalue is not null) OR (ds.devalue <> '')) THEN ds.devalue WHEN (ds.devalue is not null AND (ds.destopz <= CURDATE())) THEN '' WHEN (t1.fname is not null AND t1.lname is not null) THEN '' ELSE 'Unexpected Error' END) AS FacultyProfileLink, ds2.devalue AS Specialty, ds3.devalue AS ProfileImage, ds4.devalue AS Department, t2.sphone AS Phone,t3.title AS Title2, ptitle FROM allstudy.asstudy t2, allstudy.aslkup_title t3, allstudy.aspass t4, allstudy.aspage_display_eav pd, allstudy.asdemog t1 LEFT JOIN allstudy.asdemogsub_eav ds ON ds.staffid=t1.staffid AND ds.detypeid=2 AND (ds.destartz <= CURDATE() AND (ds.destopz > CURDATE() OR ds.destopz is null OR ds.destopz='')) LEFT JOIN allstudy.asdemogsub_eav ds2 ON ds2.staffid=t1.staffid AND ds2.detypeid=1 AND (ds2.destartz <= CURDATE() AND (ds2.destopz > CURDATE() OR ds2.destopz is null OR ds2.destopz='')) LEFT JOIN allstudy.asdemogsub_eav ds3 ON ds3.staffid=t1.staffid AND ds3.detypeid=3 AND (ds3.destartz <= CURDATE() AND (ds3.destopz > CURDATE() OR ds3.destopz is null OR ds3.destopz='')) LEFT JOIN allstudy.asdemogsub_eav ds4 ON ds4.staffid=t1.staffid AND ds4.detypeid=4 AND (ds4.destartz <= CURDATE() AND (ds4.destopz > CURDATE() OR ds4.destopz is null OR ds4.destopz='')) WHERE (t1.staffid=t2.staffid and t1.staffid=t4.staffid and t3.id=t2.stitle AND t2.study='PSYCH' AND t1.emstatus=1 AND pd.staffid=t1.staffid AND pd.study='PSYCH' AND pd.pageid=1 AND (pd.pastartz <= CURDATE() AND (pd.pastopz >= CURDATE() OR pd.pastopz is null OR pd.pastopz=''))) ORDER BY t1.lname, t1.fname