scoumbourdis/grocery-crud — pull request #88 by goFrendiAsgard (2012-08-23 05:00:27+00:00)
Title: add where clause add last parameter in set_relation_n_n

Hi @scoumbourdis,
I've just make little addition. I add where clause as the last parameter of set_relation_n_n

Here is the code to include only sch_teacher with active = 1:
````php
$crud->set_relation_n_n('teachers',
'sch_schoolyear_subject_teacher', 'sch_teacher',
'schoolyear_subject_id', 'teacher_id', '{code} - {name}',
null, array('active'=>1));
````

The drawbacks is we will have to many parameters here (7 parameters just for a function, even if they are null by defaut).

What do you think?