本文整理汇总了PHP中Problem::getIdProblem方法的典型用法代码示例。如果您正苦于以下问题:PHP Problem::getIdProblem方法的具体用法?PHP Problem::getIdProblem怎么用?PHP Problem::getIdProblem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Problem
的用法示例。
在下文中一共展示了Problem::getIdProblem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insert
/**
* bool insert(Problem $problem, int $idUser, string $login)
*
* Inserts a new medical problem into the deleted problems table.
*
* @param Problem $problem medical problem to insert
* @param int $idUser key of user that makes deletion
* @param string $login login session of user that makes deletion
* @return boolean returns false, if error occurs
* @access public
*/
function insert($problem, $idUser, $login)
{
$sql = "INSERT INTO " . $this->_table;
$sql .= " (id_problem, last_update_date, id_patient, id_member, collegiate_number, order_number, ";
$sql .= "opening_date, closing_date, meeting_place, wording, subjective, objective, ";
$sql .= "appreciation, action_plan, prescription, create_date, id_user, login) VALUES (";
$sql .= "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), ?, ?);";
$params = array($problem->getIdProblem(), $problem->getLastUpdateDate(), $problem->getIdPatient(), $problem->getIdMember(), urlencode($problem->getCollegiateNumber()), $problem->getOrderNumber(), $problem->getOpeningDate(), $problem->getClosingDate(), urlencode($problem->getMeetingPlace()), $problem->getWording(), urlencode($problem->getSubjective()), urlencode($problem->getObjective()), urlencode($problem->getAppreciation()), urlencode($problem->getActionPlan()), urlencode($problem->getPrescription()), intval($idUser), urlencode($login));
return $this->exec($sql, $params);
}
示例2: update
/**
* bool update(Problem $problem)
*
* Update a medical problem in the problems table.
*
* @param Problem $problem medical problem to update
* @return boolean returns false, if error occurs
* @access public
*/
function update($problem)
{
if (!$problem instanceof Problem) {
$this->_error = "Argument is an inappropriate object.";
return false;
}
$sql = "UPDATE " . $this->_table . " SET " . "last_update_date=CURDATE(), " . "id_member=?, " . "closing_date=?, " . "meeting_place=?, " . "wording=?, " . "subjective=?, " . "objective=?, " . "appreciation=?, " . "action_plan=?, " . "prescription=? " . "WHERE id_problem=?;";
$params = array($problem->getIdMember(), urlencode($problem->getClosingDate(false)), urlencode($problem->getMeetingPlace()), urlencode($problem->getWording()), urlencode($problem->getSubjective()), urlencode($problem->getObjective()), urlencode($problem->getAppreciation()), urlencode($problem->getActionPlan()), urlencode($problem->getPrescription()), $problem->getIdProblem());
return $this->exec($sql, $params);
}