本文整理汇总了PHP中Companies::field方法的典型用法代码示例。如果您正苦于以下问题:PHP Companies::field方法的具体用法?PHP Companies::field怎么用?PHP Companies::field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Companies
的用法示例。
在下文中一共展示了Companies::field方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
} elseif (isset($_POST['check']['out'])) {
$result = $company->check($_POST['id'], 0);
}
if (!$result) {
flash();
}
}
if (isset($_POST['set_group']) && !empty($_POST['id']) && !empty($_POST['set_group'])) {
$ids = "IN (" . implode(",", array_unique($_POST['id'])) . ")";
$member_ids = "IN (" . implode(",", array_unique($_POST['member_id'])) . ")";
$sql = "UPDATE {$tb_prefix}members m,{$tb_prefix}companies c SET c.cache_membergroupid='{$_POST['set_group']}',m.membergroup_id='{$_POST['set_group']}' WHERE c.member_id=m.id AND c.id " . $ids . " AND m.id " . $member_ids;
$pdb->Execute($sql);
}
if (isset($_POST['recommend'])) {
foreach ($_POST['id'] as $val) {
$commend_now = $company->field("if_commend", "id=" . $val);
if ($commend_now == "0") {
$result = $company->saveField("if_commend", "1", intval($val));
} else {
$result = $company->saveField("if_commend", "0", intval($val));
}
}
$company_ids = implode(",", $_POST['id']);
$result = $pdb->Execute("update " . $company->getTable() . " set status='1' where id in (" . $company_ids . ")");
if ($result) {
flash("success");
} else {
flash();
}
}
if (isset($_POST['save'])) {