本文整理汇总了PHP中ORDataObject::persist方法的典型用法代码示例。如果您正苦于以下问题:PHP ORDataObject::persist方法的具体用法?PHP ORDataObject::persist怎么用?PHP ORDataObject::persist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ORDataObject
的用法示例。
在下文中一共展示了ORDataObject::persist方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: persist
function persist()
{
parent::persist();
if (is_numeric($this->id) and !empty($this->checks)) {
$sql = "delete FROM form_review_of_systems_checks where foreign_id = '" . $this->id . "'";
sqlQuery($sql);
foreach ($this->checks as $check) {
if (!empty($check)) {
$sql = "INSERT INTO form_review_of_systems_checks set foreign_id='" . mysql_real_escape_string($this->id) . "', name = '" . mysql_real_escape_string($check) . "'";
sqlQuery($sql);
//echo "$sql<br>";
}
}
}
}
示例2: persist
function persist()
{
parent::persist();
}
示例3: persist
function persist()
{
parent::persist();
$this->address->persist($this->id);
foreach ($this->phone_numbers as $phone) {
$phone->persist($this->id);
}
}
示例4: persist
function persist($fid = "")
{
if (!empty($fid)) {
$this->foreign_id = $fid;
}
parent::persist();
}
示例5: persist
/**
* @brief Store the current structure members representing the form into the database.
*/
function persist()
{
/* Run our parent's implementation. */
parent::persist();
}
示例6: persist
function persist()
{
parent::persist();
if (is_numeric($this->id) and !empty($this->checks)) {
$sql = "delete FROM form_hp_tje_checks where foreign_id = '" . $this->id . "'";
sqlQuery($sql);
foreach ($this->checks as $check) {
if (!empty($check)) {
$sql = "INSERT INTO form_hp_tje_checks set foreign_id='" . add_escape_custom($this->id) . "', name = '" . add_escape_custom($check) . "'";
sqlQuery($sql);
//echo "$sql<br>";
}
}
}
if (is_numeric($this->id) and !empty($this->history)) {
$sql = "delete FROM form_hp_tje_history where foreign_id = '" . $this->id . "'";
sqlQuery($sql);
foreach ($this->history as $history) {
if (!empty($history)) {
$sql = "INSERT INTO form_hp_tje_history set foreign_id='" . add_escape_custom($this->id) . "'" . ", doctor = '" . add_escape_custom($history['doctor']) . "'" . ", specialty = '" . add_escape_custom($history['specialty']) . "'" . ", tx_rendered = '" . add_escape_custom($history['tx_rendered']) . "'" . ", effectiveness = '" . add_escape_custom($history['effectiveness']) . "'" . ", date = '" . add_escape_custom($history['date']) . "'";
sqlQuery($sql);
//echo "$sql<br>";
}
}
}
if (is_numeric($this->id) and !empty($this->previous_accidents)) {
$sql = "delete FROM form_hp_tje_previous_accidents where foreign_id = '" . $this->id . "'";
sqlQuery($sql);
foreach ($this->previous_accidents as $pa) {
if (!empty($pa)) {
$sql = "INSERT INTO form_hp_tje_previous_accidents set foreign_id='" . add_escape_custom($this->id) . "', nature_of_accident = '" . add_escape_custom($pa['nature_of_accident']) . "'" . ", injuries = '" . add_escape_custom($pa['injuries']) . "'" . ", date = '" . add_escape_custom($pa['date']) . "'";
sqlQuery($sql);
//echo "$sql<br>";
}
}
}
}
示例7: persist
function persist()
{
$this->date_modified = date("Y-m-d");
if ($this->id == "") {
$this->date_added = date("Y-m-d");
}
if (parent::persist()) {
}
}
示例8: persist
function persist()
{
parent::persist();
if (is_numeric($this->id) and !empty($this->checks)) {
$sql = "delete FROM form_evaluation_checks where foreign_id = '" . $this->id . "'";
sqlQuery($sql);
foreach ($this->checks as $check) {
if (!empty($check)) {
$sql = "INSERT INTO form_evaluation_checks set foreign_id='" . add_escape_custom($this->id) . "', name = '" . add_escape_custom($check) . "'";
sqlQuery($sql);
//echo "$sql<br>";
}
}
}
}