| @@ 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 |
|
| @@ 2798-2812 (lines=15) @@ | ||
| 2795 | * @param string session category ID |
|
| 2796 | * @return mixed false if the session category does not exist, array if the session category exists |
|
| 2797 | */ |
|
| 2798 | public static function get_session_category($id) |
|
| 2799 | { |
|
| 2800 | $tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY); |
|
| 2801 | $id = intval($id); |
|
| 2802 | $sql = "SELECT id, name, date_start, date_end |
|
| 2803 | FROM $tbl_session_category |
|
| 2804 | WHERE id= $id"; |
|
| 2805 | $result = Database::query($sql); |
|
| 2806 | $num = Database::num_rows($result); |
|
| 2807 | if ($num > 0) { |
|
| 2808 | return Database::fetch_array($result); |
|
| 2809 | } else { |
|
| 2810 | return false; |
|
| 2811 | } |
|
| 2812 | } |
|
| 2813 | ||
| 2814 | /** |
|
| 2815 | * Get all session categories (filter by access_url_id) |
|