| @@ 206-218 (lines=13) @@ | ||
| 203 | * @param int $career_id |
|
| 204 | * @return bool |
|
| 205 | */ |
|
| 206 | public function get_status($career_id) |
|
| 207 | { |
|
| 208 | $TBL_CAREER = Database::get_main_table(TABLE_CAREER); |
|
| 209 | $career_id = intval($career_id); |
|
| 210 | $sql = "SELECT status FROM $TBL_CAREER WHERE id = '$career_id'"; |
|
| 211 | $result = Database::query($sql); |
|
| 212 | if (Database::num_rows($result) > 0) { |
|
| 213 | $data = Database::fetch_array($result); |
|
| 214 | return $data['status']; |
|
| 215 | } else { |
|
| 216 | return false; |
|
| 217 | } |
|
| 218 | } |
|
| 219 | ||
| 220 | /** |
|
| 221 | * @param array $params |
|
| @@ 2819-2833 (lines=15) @@ | ||
| 2816 | * @param string session category ID |
|
| 2817 | * @return mixed false if the session category does not exist, array if the session category exists |
|
| 2818 | */ |
|
| 2819 | public static function get_session_category($id) |
|
| 2820 | { |
|
| 2821 | $tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY); |
|
| 2822 | $id = intval($id); |
|
| 2823 | $sql = "SELECT id, name, date_start, date_end |
|
| 2824 | FROM $tbl_session_category |
|
| 2825 | WHERE id= $id"; |
|
| 2826 | $result = Database::query($sql); |
|
| 2827 | $num = Database::num_rows($result); |
|
| 2828 | if ($num > 0) { |
|
| 2829 | return Database::fetch_array($result); |
|
| 2830 | } else { |
|
| 2831 | return false; |
|
| 2832 | } |
|
| 2833 | } |
|
| 2834 | ||
| 2835 | /** |
|
| 2836 | * Get all session categories (filter by access_url_id) |
|