当前位置: 首页>>代码示例>>PHP>>正文


PHP UserDAO::Find方法代码示例

本文整理汇总了PHP中UserDAO::Find方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDAO::Find方法的具体用法?PHP UserDAO::Find怎么用?PHP UserDAO::Find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserDAO的用法示例。


在下文中一共展示了UserDAO::Find方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Find

 public function Find()
 {
     if (!parent::Find()) {
         return false;
     }
     if ($this->UserClass != "Patient") {
         return false;
     }
     $conn = parent::GetConnection();
     $query = $this->SetupQuery(Query::FIND_PATIENT);
     $result = odbc_exec($conn, $query);
     if (!$result) {
         return $this->HandleError($conn);
     }
     $row = array();
     if (!odbc_fetch_into($result, $row)) {
         return $this->HandleError($conn);
     }
     //Copy the values from the single record returned.
     $this->Height = $row[0];
     $this->Weight = $row[1];
     $this->DOB = $row[2];
     $this->Gender = $row[3];
     $this->SSN = $row[4];
     $this->MedicalConditions = $row[5];
     $this->ClinicianId = $row[6];
     return true;
 }
开发者ID:hadleymj,项目名称:Senior-Design-Fall-2009,代码行数:28,代码来源:PatientDAO.php

示例2: UserDAO

<?php

require_once "../daos/db_include.php";
$username = $_POST["username"];
$password = $_POST["password"];
$u = new UserDAO();
$u->Username = $username;
$u->Find();
if ($u->Password == $password && $u->UserClass == "Admin") {
    session_start();
    $_SESSION["username"] = $username;
    $_SESSION["loggedin"] = TRUE;
    $_SESSION["inactive_time"] = 600;
    //Timeout Time in Seconds
    header("Location: homepage.php");
} else {
    ob_end_clean();
    header("Location: index.php?error=101");
}
开发者ID:hadleymj,项目名称:Senior-Design-Fall-2009,代码行数:19,代码来源:login.php

示例3: header

require_once "../daos/db_include.php";
//UserDAO DB fields
$Username = $_POST["username"];
$Password = $_POST["password"];
$FirstName = $_POST["firstname"];
$MiddleName = $_POST["middlename"];
$LastName = $_POST["lastname"];
$Address = $_POST["address"];
$PhoneNumber = $_POST["phone"];
$UserClass = "Clinician";
if ($Username == "" || $Password == "" || $FirstName == "" || $MiddleName == "" || $LastName == "" || $Address == "" || $PhoneNumber == "") {
    header("Location: add_clinician.php?error=102");
}
$u = new UserDAO();
$u->Username = $Username;
if ($u->Find()) {
    header("Location: add_clinician.php?error=103");
}
$u->Password = $Password;
$u->FirstName = $FirstName;
$u->MiddleName = $MiddleName;
$u->LastName = $LastName;
$u->Address = $Address;
$u->PhoneNumber = $PhoneNumber;
$u->UserClass = $UserClass;
$u->Insert();
header("Location: clinicians.php");
/*
$worked = $p->Insert();
if ($worked)
{
开发者ID:hadleymj,项目名称:Senior-Design-Fall-2009,代码行数:31,代码来源:clinician_script.php


注:本文中的UserDAO::Find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。