i have a aquestion on left join in cgridview, i have 2 table employee where can acces employee information and evaluation where can store submitted evaluation,
my question is how can i view the employee who are not submitted there evaluation…
i use the left join on my employee model search
$criteria->join= 'LEFT JOIN performance_evaluation p ON t.empno = p.empno AND p.school_year=2 and p.semester=2';
the result is ok and i got the result but i dont know how can i access the table column from evaluation table to griview and how can i use search/filter using school_year and semester from evaluation table
more info: i call employee model on my evaluation controller so that i can use left join… and on my employee model i have set relation has many to evaluation table and my evaluatio table has set relation belongs to employee table.
here is my sample table:
employee table:
empno(pk)
lname
fname
evaluation table:
id(pk)
empno(related to employee table)
evaluation
school_year
semester
interpretation
my expected output on cgridview:
school_year[dropdown]
semester[dropdown]
[filter button]
empno lname fname evaluation interpretation