| @@ 557-568 (lines=12) @@ | ||
| 554 | $limit_text = "LIMIT $from, $limit"; |
|
| 555 | } |
|
| 556 | ||
| 557 | if (count($relation_type) == 0) { |
|
| 558 | $where_relation_condition = ''; |
|
| 559 | } else { |
|
| 560 | $new_relation_type = array(); |
|
| 561 | foreach ($relation_type as $rel) { |
|
| 562 | $rel = intval($rel); |
|
| 563 | $new_relation_type[] = "'$rel'"; |
|
| 564 | } |
|
| 565 | $relation_type = implode(',', $new_relation_type); |
|
| 566 | if (!empty($relation_type)) |
|
| 567 | $where_relation_condition = "AND gu.relation_type IN ($relation_type) "; |
|
| 568 | } |
|
| 569 | ||
| 570 | $sql = "SELECT |
|
| 571 | picture_uri as image, |
|
| @@ 1906-1917 (lines=12) @@ | ||
| 1903 | $limit_text = "LIMIT $from, $limit"; |
|
| 1904 | } |
|
| 1905 | ||
| 1906 | if (count($relation_type) == 0) { |
|
| 1907 | $where_relation_condition = ''; |
|
| 1908 | } else { |
|
| 1909 | $new_relation_type = array(); |
|
| 1910 | foreach($relation_type as $rel) { |
|
| 1911 | $rel = intval($rel); |
|
| 1912 | $new_relation_type[] ="'$rel'"; |
|
| 1913 | } |
|
| 1914 | $relation_type = implode(',', $new_relation_type); |
|
| 1915 | if (!empty($relation_type)) |
|
| 1916 | $where_relation_condition = "AND gu.relation_type IN ($relation_type) "; |
|
| 1917 | } |
|
| 1918 | ||
| 1919 | $sql = "SELECT picture_uri as image, u.id, u.firstname, u.lastname, relation_type |
|
| 1920 | FROM $tbl_user u |
|