public static function read_by_doc($doc_id) { return parent::read(['id'], FALSE, ['doc_id = ?', $doc_id])[0]; }
if ($_POST) { $id = $_POST['id']; $update = $_POST['record']; if ($record->update($id, $update)) { Flash::success('Record Successfully Updated!!'); unset($_POST); } else { Flash::error('Record Could Not Be Updated!!'); } } if (isset($_GET['id'])) { $user_id = $_GET['id']; } else { $user_id = $_SESSION['user_id']; } $data = $record->read($user_id); require 'templates/header.php'; ?> <div id="page-wrapper"> <div class="container-fluid"> <!-- Page Heading --> <div class="row"> <div class="col-lg-12"> <h1 class="page-header"> Patient Record <small>View Records</small> </h1> <ol class="breadcrumb">
public static function find_one($email, $password) { $c_password = crypt($password, SALT); $model = parent::read(['*'], TRUE, ['email = ? AND password = ?', $email, $c_password]); return isset($model['error']) ? FALSE : $model; }
public static function by_name($name) { return parent::read(['doc.*', self::$props['content']], TRUE, ["name = ?", $name]); }