parsiteam
Member
سلام دوستان . راستش من یک کوئری خیلی بزرگ دیدم . این طرف همش اومده از دستور Left Join استفاده کرده . میشه بگین این دستور در یک کوئری چه کاری انجام میده ؟ اینم کوئری :
با تشکر .
PHP:
Original query: insert into SemesterAccLog(LesCode,GrpCode,LesName,ProName,LesFeeDesc,amount,TotalAmount,LesUnit,TimeAction,CourseStatus) select PL.LesCode, GrpCode,PLesName, if (trim(Prof.PProLName) = '' , ' استاد مشخص نیست ', Prof.PProLName) as PProLName , LesFeeDesc,ifnull(fee,0) as amount, (IFNULL(round(fee * LesFeeTotalUnit,-1),0)*(IsExension(8715415074,PL.LesCode,1387,2))) as TotalAmount, LesFeeTotalUnit, ActionPeriod, CourseStatus from SelectedCourses SC inner join StudentSpecs sp on (sp.StNo = SC.StNo) left join PresentedLessons PL on (SC.LesID = PL.LesID) left join professors Prof on (PL.ProCode = Prof.ProCode) left join lessons L on (L.LesCode = PL.LesCode ) left join LesFeeTypes LFT on (L.LesFeeCode = LFT.LesFeeCode ) left join ngLessonTuition LT on (LT.LesFeeCode = LFT.LesFeeCode and LT.EduYear = 1387 and LT.semester = 1 and LT.StartingYear = sp.StartingYear and LT.FldCode = sp.FldCode and LT.meliat =sp.meliat and LT.EduSecCode = sp.EduSecCode) where SC.StNo='8715415074' and PL.EduYear = 1387 and PL.semester = 2 and ((ActionPeriod<=82 and CourseStatus<>61 ) || (ActionPeriod>82 and ActionPeriod<>84))
با تشکر .









