Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sqlString=
- "
- select distinct s.id s_speciality,s.name speciality,g.course,g.id s_student_group,g.group_name,g.course||'_'||g.group_name group_sort from profile_student_group g
- inner join spr_speciality s on g.s_speciality=s.id
- where g.s_faculty=:facultyId
- ";
- $listData = array(
- 'sqlString' => $sqlString,
- 'sqlParams' => array(
- ':facultyId' => 1,
- ),
- 'lists' => array(
- array(
- 'listName' => 's_speciality',
- 'columnValue' => 's_speciality',
- 'columnName' => 'speciality',
- 'columnSort' => 'speciality',
- 'sortDirection' => 'desc',
- 'includeEmptyValue' => false,
- 'defaultValue' => '229',
- ),
- array(
- 'listName' => 'course',
- 'columnValue' => 'course',
- 'columnName' => 'course',
- 'columnSort' => 'course',
- 'sortDirection' => 'asc',
- 'includeEmptyValue' => true,
- 'nameForEmptyValue' => 'Все курсы',
- 'defaultValue' => '',
- ),
- array(
- 'listName' => 's_student_group',
- 'columnValue' => 's_student_group',
- 'columnName' => 'group_name',
- 'columnSort' => 'group_sort',
- 'sortDirection' => 'asc',
- 'includeEmptyValue' => false,
- 'defaultValue' => '',
- ),
- ),
- );
- $lists = getLinkedList($listData);
- print_r($lists['s_speciality']['data']);
- echo $lists['s_speciality']['selectedValue'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement