本文整理匯總了PHP中DmQuery::insert方法的典型用法代碼示例。如果您正苦於以下問題:PHP DmQuery::insert方法的具體用法?PHP DmQuery::insert怎麽用?PHP DmQuery::insert使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DmQuery
的用法示例。
在下文中一共展示了DmQuery::insert方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
$_POST["description"] = $dm->getDescription();
$dm->setMaxFines($_POST["max_fines"]);
$_POST["max_fines"] = $dm->getMaxFines();
if (!$dm->validateData()) {
$pageErrors["description"] = $dm->getDescriptionError();
$_SESSION["postVars"] = $_POST;
$_SESSION["pageErrors"] = $pageErrors;
header("Location: ../admin/mbr_classify_new_form.php");
exit;
}
#**************************************************************************
#* Insert new domain table row
#**************************************************************************
$dmQ = new DmQuery();
$dmQ->connect();
$dmQ->insert("mbr_classify_dm", $dm);
$dmQ->close();
#**************************************************************************
#* Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
#**************************************************************************
#* Show success page
#**************************************************************************
require_once "../shared/header.php";
echo $loc->getText("Classification type, %desc%, has been added.", array('desc' => $dm->getDescription()));
?>
<br><br>
<a href="../admin/mbr_classify_list.php"><?php
echo $loc->getText("return to member classification list");
示例2: header
}
if (!empty($pageErrors)) {
$_SESSION["postVars"] = $_POST;
$_SESSION["pageErrors"] = $pageErrors;
header("Location: ../admin/member_fields_new_form.php");
exit;
}
#**************************************************************************
#* Insert new domain table row
#**************************************************************************
$dm = new Dm();
$dm->setCode($_POST["code"]);
$dm->setDescription($_POST["description"]);
$dmQ = new DmQuery();
$dmQ->connect();
$dmQ->insert("member_fields_dm", $dm);
$dmQ->close();
#**************************************************************************
#* Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
#**************************************************************************
#* Show success page
#**************************************************************************
require_once "../shared/header.php";
echo $loc->getText("Member field, %desc%, has been added.", array('desc' => $dm->getDescription()));
?>
<br><br>
<a href="../admin/member_fields_list.php"><?php
echo $loc->getText("return to member fields list");
示例3: H
$_POST["description"] = $dm->getDescription();
$dm->setImageFile($_POST["imageFile"]);
$_POST["imageFile"] = $dm->getImageFile();
if (!$dm->validateData()) {
$pageErrors["description"] = $dm->getDescriptionError();
$_SESSION["postVars"] = $_POST;
$_SESSION["pageErrors"] = $pageErrors;
header("Location: ../admin/materials_new_form.php");
exit;
}
#**************************************************************************
#* Insert new domain table row
#**************************************************************************
$dmQ = new DmQuery();
$dmQ->connect();
$dmQ->insert("material_type_dm", $dm);
$dmQ->close();
#**************************************************************************
#* Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
#**************************************************************************
#* Show success page
#**************************************************************************
require_once "../shared/header.php";
echo $loc->getText("admin_materials_delMaterialType");
echo H($dm->getDescription());
?>
<br><br>
<a href="../admin/materials_list.php"><?php
示例4: H
$dm->setCode($_POST["code"]);
$_POST["code"] = $dm->getCode();
//print_r ($dm);
if (!$dm->validateData()) {
$pageErrors["description"] = $dm->getDescriptionError();
$_SESSION["postVars"] = $_POST;
$_SESSION["pageErrors"] = $pageErrors;
header("Location: ../admin/matstat_new_form.php");
exit;
}
#**************************************************************************
#* Insert new domain table row
#**************************************************************************
$dmQ = new DmQuery();
$dmQ->connect();
$dmQ->insert("biblio_status_dm", $dm);
$dmQ->close();
#**************************************************************************
#* Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
#**************************************************************************
#* Show success page
#**************************************************************************
require_once "../shared/header.php";
echo $loc->getText("admin_materials_listMaterialstate") . " ";
echo H($dm->getDescription()) . " " . $loc->getText("adminCollections_newAdded");
?>
<br><br>
<a href="../admin/matstat_list.php"><?php
示例5: H
$_POST["dailyLateFee"] = $dm->getDailyLateFee();
if (!$dm->validateData()) {
$pageErrors["description"] = $dm->getDescriptionError();
$pageErrors["daysDueBack"] = $dm->getDaysDueBackError();
$pageErrors["dailyLateFee"] = $dm->getDailyLateFeeError();
$_SESSION["postVars"] = $_POST;
$_SESSION["pageErrors"] = $pageErrors;
header("Location: ../admin/collections_new_form.php");
exit;
}
#**************************************************************************
#* Insert new domain table row
#**************************************************************************
$dmQ = new DmQuery();
$dmQ->connect();
$dmQ->insert("collection_dm", $dm);
$dmQ->close();
#**************************************************************************
#* Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
#**************************************************************************
#* Show success page
#**************************************************************************
require_once "../shared/header.php";
echo $loc->getText("adminCollections_delStart");
echo H($dm->getDescription());
echo $loc->getText("adminCollections_newAdded");
?>
<br><br>