Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.27 KB | None | 0 0
  1. $sqlString=
  2.     "
  3.    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
  4.    inner join spr_speciality s on g.s_speciality=s.id
  5.    where g.s_faculty=:facultyId
  6.    ";    
  7. $listData = array(
  8.     'sqlString'   =>  $sqlString,
  9.     'sqlParams'   =>  array(
  10.                     ':facultyId' =>  1,
  11.     ),
  12.     'lists'       => array(
  13.                             array(
  14.                                 'listName'          =>  's_speciality',
  15.                                 'columnValue'       =>  's_speciality',
  16.                                 'columnName'        =>  'speciality',
  17.                                 'columnSort'        =>  'speciality',
  18.                                 'sortDirection'     =>  'desc',
  19.                                 'includeEmptyValue' =>  false,                                
  20.                                 'defaultValue'      =>  '229',
  21.                             ),
  22.                             array(
  23.                                 'listName'          =>  'course',
  24.                                 'columnValue'       =>  'course',
  25.                                 'columnName'        =>  'course',
  26.                                 'columnSort'        =>  'course',
  27.                                 'sortDirection'     =>  'asc',
  28.                                 'includeEmptyValue' =>  true,
  29.                                 'nameForEmptyValue' =>  'Все курсы',
  30.                                 'defaultValue'      =>  '',
  31.                             ),
  32.                             array(
  33.                                 'listName'          =>  's_student_group',
  34.                                 'columnValue'       =>  's_student_group',
  35.                                 'columnName'        =>  'group_name',
  36.                                 'columnSort'        =>  'group_sort',
  37.                                 'sortDirection'     =>  'asc',
  38.                                 'includeEmptyValue' =>  false,
  39.                                 'defaultValue'      =>  '',
  40.                             ),
  41.     ),
  42. );
  43. $lists = getLinkedList($listData);
  44. print_r($lists['s_speciality']['data']);
  45. echo $lists['s_speciality']['selectedValue'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement