getStaffJobTitle ( $id )
Source file: app/functions/staff-function.php
Used by
Uses
- app/functions/global-function.php: _etsis_flash()
Source
function getStaffJobTitle($id) { $app = \Liten\Liten::getInstance(); try { $title = $app->db->job() ->select('job.title') ->_join('staff_meta', 'job.ID = staff_meta.jobID') ->where('staff_meta.staffID = ?', $id)->_and_() ->where('staff_meta.hireDate = (SELECT MAX(hireDate) FROM staff_meta WHERE staffID = ?)', $id) ->findOne(); return _h($title->title); } catch (NotFoundException $e) { Cascade::getLogger('error')->error($e->getMessage()); _etsis_flash()->error(_etsis_flash()->notice(409)); } catch (ORMException $e) { Cascade::getLogger('error')->error($e->getMessage()); _etsis_flash()->error(_etsis_flash()->notice(409)); } catch (Exception $e) { Cascade::getLogger('error')->error($e->getMessage()); _etsis_flash()->error(_etsis_flash()->notice(409)); } }
Expand full source code Collapse full source code View on Github