當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Companies::field方法代碼示例

本文整理匯總了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'])) {
開發者ID:renduples,項目名稱:alibtob,代碼行數:31,代碼來源:company.php


注:本文中的Companies::field方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。