isSpecNode=string.Format(",IFNULL((SELECT SpecialNode FROM rb_student_backrelevance WHERE Id IN(SELECT BackrelevanceId FROM rb_student_backrecord WHERE ConditionId=A.BackId AND AuditStatus=1 AND AuditEmId={0})),0) AS SpecialNode ",query.CreateBy);
}
builder.AppendFormat(@"
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,IFNULL(C.SName,'') AS SchoolName,IFNULL(D.ClassName,'') AS ClassName,IFNULL(T.TeacherName,'') AS TeacherName
,IFNULL(E.EnterID,0) AS EnterID,IFNULL(F.CourseName,'') AS CourseName
,IFNULL(E.EnterID,0) AS EnterID,IFNULL(F.CourseName,'') AS CourseName {0}
FROM RB_Student_BackClass AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id
LEFT JOIN rb_school AS C ON A.SchoolId=C.SId
LEFT JOIN rb_class AS D ON A.ClassId=D.ClassId
...
...
@@ -35,7 +40,7 @@ FROM RB_Student_BackClass AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id