本文整理匯總了PHP中Attribute::saveAttribute方法的典型用法代碼示例。如果您正苦於以下問題:PHP Attribute::saveAttribute方法的具體用法?PHP Attribute::saveAttribute怎麽用?PHP Attribute::saveAttribute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Attribute
的用法示例。
在下文中一共展示了Attribute::saveAttribute方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: editattributeAction
public function editattributeAction()
{
global $mySession;
$db = new Db();
$attrId = $this->getRequest()->getParam('attrId');
$attrData = $db->runQuery("select * from " . ATTRIBUTE . " where attribute_id = '{$attrId}' ");
$this->view->attrData = $attrData[0];
$this->view->attrId = $attrId;
$this->view->pageHeading = "Edit Property Attribute";
if ($this->getRequest()->isPost()) {
$request = $this->getRequest();
$dataForm = $_REQUEST;
$myObj = new Attribute();
//prd($dataForm);
$Result = $myObj->saveAttribute($dataForm, $attrId);
if ($Result == 1) {
$mySession->sucessMsg = "Attribute updated successfully.";
$this->_redirect('property/attributes');
} else {
$mySession->errorMsg = "This Specification you entered is already exists.";
}
}
}