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


PHP mysql::updatetable方法代碼示例

本文整理匯總了PHP中mysql::updatetable方法的典型用法代碼示例。如果您正苦於以下問題:PHP mysql::updatetable方法的具體用法?PHP mysql::updatetable怎麽用?PHP mysql::updatetable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mysql的用法示例。


在下文中一共展示了mysql::updatetable方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: exit

require_once QISHI_ROOT_PATH . 'include/fun_company.php';
$user = get_user_info($_SESSION['uid']);
if ($user['status'] == "2") {
    exit('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableall">
		    <tr>
				<td width="20" align="right"></td>
				<td>
					您的賬號處於暫停狀態,請聯係管理員設為正常後進行操作!
				</td>
		    </tr>
		</table>');
}
$resume_id = $_REQUEST['resume_id'] ? intval($_REQUEST['resume_id']) : exit("簡曆ID丟失!");
$setarr['resume_state'] = $_REQUEST['resume_state'] ? intval($_REQUEST['resume_state']) : exit("標記狀態錯誤!");
$setarr['resume_state_cn'] = $_REQUEST['resume_state_cn'] ? iconv('utf-8', 'gbk', trim($_REQUEST['resume_state_cn'])) : exit("標記狀態錯誤!");
$p_uid = $db->getone("SELECT uid FROM " . table('resume') . " WHERE id={$resume_id} LIMIT 1 ");
$uid = intval($_SESSION['uid']);
$row = $db->getone("select resume_id from " . table("company_label_resume") . " where uid={$uid} and resume_id={$resume_id} limit 1");
if (empty($row)) {
    $setarr['resume_id'] = $resume_id;
    $setarr['uid'] = $uid;
    $setarr['personal_uid'] = $p_uid['uid'];
    $db->inserttable(table('company_label_resume'), $setarr);
    //將查看狀態更新成已經查看
    $db->updatetable(table('personal_jobs_apply'), array('personal_look' => '2', 'is_reply' => $setarr['resume_state']), array("company_uid" => $uid, "resume_id" => $resume_id));
} else {
    $db->updatetable(table('company_label_resume'), $setarr, array("uid" => $uid, "resume_id" => $resume_id));
    //將查看狀態更新成已經查看
    $db->updatetable(table('personal_jobs_apply'), array('personal_look' => '2', 'is_reply' => $setarr['resume_state']), array("company_uid" => $uid, "resume_id" => $resume_id));
}
exit("ok");
開發者ID:winiceo,項目名稱:job,代碼行數:31,代碼來源:user_label_resume.php

示例2: trim

    $setsqlarr['detailed'] = trim($_POST['detailed']);
    $setsqlarr['refreshtime'] = time();
    $days = intval($_POST['days']);
    if ($days > 0) {
        $time = $info['deadline'] > time() ? $info['deadline'] : time();
        $setsqlarr['deadline'] = strtotime("{$days} day", $time);
    }
    $setsqlarr['likekey'] = $setsqlarr['jobname'] . "," . $setsqlarr['comname'] . "," . $setsqlarr['address'] . "," . $setsqlarr['detailed'];
    require_once QISHI_ROOT_PATH . 'include/splitword.class.php';
    $sp = new SPWord();
    $setsqlarr['key'] = $setsqlarr['jobname'] . $setsqlarr['comname'] . $setsqlarr['address'] . $setsqlarr['detailed'];
    $setsqlarr['key'] = "{$setsqlarr['jobname']} {$setsqlarr['comname']} " . $sp->extracttag($setsqlarr['key']);
    $setsqlarr['key'] = $sp->pad($setsqlarr['key']);
    $link[0]['text'] = "返回微招聘列表";
    $link[0]['href'] = url_rewrite('QS_simplelist');
    if ($db->updatetable(table('simple'), $setsqlarr, " id='{$id}' ")) {
        if ($_CFG['simple_edit_audit'] > 1) {
            $str = ",請等待管理員審核";
        }
        showmsg("修改成功{$str}!", 2, $link);
    } else {
        showmsg("修改失敗!", 0);
    }
} elseif ($act == 'check_tel') {
    $tel = $_GET['tel'];
    $id = intval($_GET['id']);
    if (preg_match("/^\\d*\$/", $tel)) {
        if ($id > 0) {
            $wheresql = " AND id<>'{$id}'";
        }
        $sql = "select id from " . table('simple') . " where tel = '{$tel}' {$wheresql} LIMIT 1";
開發者ID:winiceo,項目名稱:fenzhan,代碼行數:31,代碼來源:ajax_simple.php

示例3: elseif

        $smarty->assign('type', $type);
        $smarty->assign('username', $username);
        $smarty->display('m/password-set-new.html');
    }
} elseif ($act == 'set_pass_save') {
    global $QS_pwdhash;
    $_POST = array_map("utf8_to_gbk", $_POST);
    $username = trim($_POST['username']);
    $password = trim($_POST['password']);
    $password_two = trim($_POST['password_two']);
    if (empty($username) || empty($password) || empty($password_two)) {
        exit('信息丟失!');
    }
    if ($password != $password_two) {
        exit('兩次輸入的密碼不同!');
    }
    if (preg_match("/^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$/", $username)) {
        $userinfo = get_user_inemail($username);
    } elseif (preg_match("/^(13|14|15|17|18)\\d{9}\$/", $username)) {
        $userinfo = get_user_inmobile($username);
    }
    $password_hash = md5(md5($password) . $userinfo['pwd_hash'] . $QS_pwdhash);
    $setsqlarr['password'] = $password_hash;
    $rst = $db->updatetable(table('members'), $setsqlarr, array("uid" => $userinfo['uid']));
    if ($rst) {
        exit('ok');
    } else {
        exit('設置新密碼失敗!');
    }
}
unset($smarty);
開發者ID:winiceo,項目名稱:fenzhan,代碼行數:31,代碼來源:user_get_pass.php

示例4: exit

        } else {
            exit("郵箱配置出錯,請聯係網站管理員");
        }
    }
} elseif ($act == "verify_code") {
    $verifycode = trim($_POST['verifycode']);
    if (empty($verifycode) || empty($_SESSION['email_rand']) || $verifycode != $_SESSION['email_rand']) {
        exit("驗證碼錯誤");
    } else {
        $uid = intval($_SESSION['uid']);
        if (empty($uid)) {
            exit("係統錯誤,UID丟失!");
        } else {
            $setsqlarr['email'] = $_SESSION['verify_email'];
            $setsqlarr['email_audit'] = 1;
            $db->updatetable(table('members'), $setsqlarr, " uid='{$uid}'");
            if ($_SESSION['utype'] == "2") {
                $infoarr['email'] = $setsqlarr['email'];
                $db->updatetable(table('members_info'), $infoarr, " uid='{$uid}'");
                $u['email'] = $setsqlarr['email'];
                $db->updatetable(table('resume'), $u, " uid='{$uid}'");
                // 積分操作
                $rule = get_cache('points_rule');
                if ($rule['per_verifyemail']['value'] > 0) {
                    $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='per_verifyemail'   LIMIT 1");
                    if (empty($info)) {
                        $time = time();
                        $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$_SESSION['uid']}', 'per_verifyemail','{$time}')");
                        require_once QISHI_ROOT_PATH . 'include/fun_personal.php';
                        report_deal($_SESSION['uid'], $rule['per_verifyemail']['type'], $rule['per_verifyemail']['value']);
                        $user_points = get_user_points($_SESSION['uid']);
開發者ID:winiceo,項目名稱:job,代碼行數:31,代碼來源:ajax_verify_email.php

示例5: elseif

} elseif ($act == "verify_code") {
    $send_key = trim($_POST['send_key']);
    if (empty($send_key) || $send_key != $_SESSION['send_mobile_key']) {
        exit("鏈接錯誤");
    }
    $verifycode = trim($_POST['verifycode']);
    if (empty($verifycode) || empty($_SESSION['mobile_rand']) || $verifycode != $_SESSION['mobile_rand']) {
        exit("驗證碼錯誤");
    } else {
        $uid = intval($_SESSION['uid']);
        if (empty($uid)) {
            exit("係統錯誤,UID丟失!");
        } else {
            $setsqlarr['mobile'] = $_SESSION['verify_mobile'];
            $setsqlarr['mobile_audit'] = 1;
            $db->updatetable(table('members'), $setsqlarr, " uid='{$uid}'");
            unset($setsqlarr, $_SESSION['verify_mobile'], $_SESSION['mobile_rand']);
            if ($_CFG['operation_mode'] == '1' || $_CFG['operation_mode'] == '3') {
                $rule = get_cache('points_rule');
                if ($rule['verifymobile']['value'] > 0) {
                    $info = $db->getone("SELECT uid FROM " . table('members_handsel') . " WHERE uid ='{$_SESSION['uid']}' AND htype='verifymobile' LIMIT 1");
                    if (empty($info)) {
                        $time = time();
                        $db->query("INSERT INTO " . table('members_handsel') . " (uid,htype,addtime) VALUES ('{$_SESSION['uid']}', 'verifymobile','{$time}')");
                        require_once QISHI_ROOT_PATH . 'include/fun_comapny.php';
                        report_deal($_SESSION['uid'], $rule['verifymobile']['type'], $rule['verifymobile']['value']);
                        $user_points = get_user_points($_SESSION['uid']);
                        $operator = $rule['verifymobile']['type'] == "1" ? "+" : "-";
                        $_SESSION['handsel_verifymobile'] = $_CFG['points_byname'] . $operator . $rule['verifymobile']['value'];
                        write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], " 手機通過驗證,{$_CFG['points_byname']}({$operator}{$rule['verifymobile']['value']}),(剩餘:{$user_points})", 1, 1016, "手機認證通過", "{$operator}{$rule['verifymobile']['value']}", "{$user_points}");
                    }
開發者ID:winiceo,項目名稱:job,代碼行數:31,代碼來源:account_security.php

示例6: intval

 $setsqlarr['key'] = $sp->pad($setsqlarr['key']);
 if ($company_info['audit'] == "1") {
     $_CFG['audit_verifycom_editjob'] != "-1" ? $setsqlarr['audit'] = intval($_CFG['audit_verifycom_editjob']) : '';
 } else {
     $_CFG['audit_unexaminedcom_editjob'] != "-1" ? $setsqlarr['audit'] = intval($_CFG['audit_unexaminedcom_editjob']) : '';
 }
 $setsqlarr_contact['contact'] = !empty($_POST['contact']) ? trim($_POST['contact']) : exit('您沒有填寫聯係人!');
 $setsqlarr_contact['telephone'] = !empty($_POST['telephone']) ? trim($_POST['telephone']) : exit('您沒有填寫聯係電話!');
 $setsqlarr_contact['email'] = !empty($_POST['email']) ? trim($_POST['email']) : exit('您沒有填寫聯係郵箱!');
 $setsqlarr_contact['address'] = !empty($_POST['address']) ? trim($_POST['address']) : exit('您沒有填寫詳細地址!');
 check_word($_CFG['filter'], $_POST['telephone']) ? exit($_CFG['filter_tips']) : '';
 $setsqlarr_contact['contact_show'] = 1;
 $setsqlarr_contact['email_show'] = 1;
 $setsqlarr_contact['telephone_show'] = 1;
 $setsqlarr_contact['address_show'] = 1;
 if (!$db->updatetable(table('jobs'), $setsqlarr, " id='{$id}' AND uid='{$_SESSION['uid']}' ")) {
     exit("err");
 }
 if (!$db->updatetable(table('jobs_tmp'), $setsqlarr, " id='{$id}' AND uid='{$_SESSION['uid']}' ")) {
     exit("err");
 }
 if (!$db->updatetable(table('jobs_contact'), $setsqlarr_contact, " pid='{$id}' ")) {
     exit("err");
 }
 if ($add_mode == '1') {
     if ($points_rule['jobs_edit']['value'] > 0) {
         report_deal($_SESSION['uid'], $points_rule['jobs_edit']['type'], $points_rule['jobs_edit']['value']);
         $user_points = get_user_points($_SESSION['uid']);
         $operator = $points_rule['jobs_edit']['type'] == "1" ? "+" : "-";
         write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "修改職位:<strong>{$setsqlarr['jobs_name']}</strong>,({$operator}{$points_rule['jobs_edit']['value']}),(剩餘:{$user_points})", 1, 1002, "修改招聘信息", "{$operator}{$points_rule['jobs_edit']['value']}", "{$user_points}");
     }
開發者ID:winiceo,項目名稱:fenzhan,代碼行數:31,代碼來源:company_jobs.php

示例7: get_user_email

define('IN_QISHI', true);
require_once dirname(__FILE__) . '/../include/common.inc.php';
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
require_once QISHI_ROOT_PATH . 'include/fun_user.php';
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
unset($dbhost, $dbuser, $dbpass, $dbname);
if ($_SESSION['input_token_subscribe'] != "" && $_SESSION['input_token_subscribe'] == $_POST['input_token_subscribe']) {
    $setsqlarr['email'] = trim($_POST['email']) ? trim($_POST['email']) : showmsg("請填寫接收郵箱!", 1);
    $setsqlarr['search_name'] = trim($_POST['search_name']);
    $setsqlarr['district'] = trim($_POST['district_id']);
    $setsqlarr['district_cn'] = trim($_POST['district_cn']) ? trim($_POST['district_cn']) : showmsg("請填寫意向地區!", 1);
    $setsqlarr['days'] = intval($_POST['days']) ? intval($_POST['days']) : showmsg("請選擇發送周期!", 1);
    $setsqlarr['addtime'] = time();
    $ck_email = get_user_email(strtolower($_POST['email']));
    if ($ck_email) {
        $db->updatetable(table('jobs_subscribe'), $setsqlarr, " email='" . strtolower($_POST['email']) . "' ");
    } else {
        $insertid = $db->inserttable(table('jobs_subscribe'), $setsqlarr);
    }
    send_subscribe_jobs($setsqlarr);
    $link[0]['text'] = "返回";
    $link[0]['href'] = 'index.php';
    showmsg("恭喜您訂閱成功!", 2, $link);
} else {
    showmsg("非法操作!", 1);
}
function get_user_email($email)
{
    global $db;
    $ck_email = $db->getone("select 1 from " . table('jobs_subscribe') . " where email='" . $email . "'");
    return $ck_email;
開發者ID:winiceo,項目名稱:job,代碼行數:31,代碼來源:submit.php

示例8: elseif

            // var_dump($company_tag);die;
            $smarty->assign('company_tag', $company_tagarr['id']);
            $smarty->assign('title', $company_info['companyname'] . " - 企業福利 ");
            $smarty->display("m/m-wzp_welfare.html");
        }
    } else {
        $smarty->display("m/m-wzp_error.html");
    }
} elseif ($act == "company_welfare_add") {
    $setarr['tag'] = ltrim($_GET['tag'], ",");
    if ($company_id > 0) {
        $company_info = $db->getone("SELECT * from " . table("company_profile") . " where id={$company_id} limit 1");
        if ($company_info["uid"] != $_SESSION['uid']) {
            exit("err");
        }
        $db->updatetable(table('company_profile'), $setarr, array('id' => $company_id, 'uid' => $_SESSION['uid'])) ? exit("ok") : exit("err");
    } else {
        exit('err');
    }
} elseif ($act == "company_tpl") {
    // 企業信息
    if ($company_id > 0) {
        $company_info = $db->getone("SELECT * from " . table("company_profile") . " where id={$company_id} limit 1");
        $smarty->assign('company_info', $company_info);
        if (empty($company_info) || $company_info['uid'] != $_SESSION['uid']) {
            header("location:login.php");
        } else {
            $smarty->assign('title', $company_info['companyname'] . " - 模版 ");
            $smarty->display("m/m-wzp_tpl.html");
        }
    } else {
開發者ID:winiceo,項目名稱:fenzhan,代碼行數:31,代碼來源:m-wzp.php

示例9: trim

 $setsqlarr['email'] = trim($_POST['email']) ? trim($_POST['email']) : exit('請填寫聯係郵箱!');
 $setsqlarr['website'] = trim($_POST['website']);
 $setsqlarr['contents'] = trim($_POST['contents']) ? trim($_POST['contents']) : exit('請填寫公司簡介!');
 $setsqlarr['contact_show'] = 1;
 $setsqlarr['email_show'] = 1;
 $setsqlarr['telephone_show'] = 1;
 $setsqlarr['address_show'] = 1;
 if ($_CFG['company_repeat'] == "0") {
     $info = $db->getone("SELECT uid FROM " . table('company_profile') . " WHERE companyname ='{$setsqlarr['companyname']}' AND uid<>'{$_SESSION['uid']}' LIMIT 1");
     if (!empty($info)) {
         exit("{$setsqlarr['companyname']}已經存在,同公司信息不能重複注冊");
     }
 }
 if ($company_info) {
     $_CFG['audit_edit_com'] != "-1" ? $setsqlarr['audit'] = intval($_CFG['audit_edit_com']) : '';
     if ($db->updatetable(table('company_profile'), $setsqlarr, " uid={$_SESSION['uid']}")) {
         $jobarr['companyname'] = $setsqlarr['companyname'];
         $jobarr['trade'] = $setsqlarr['trade'];
         $jobarr['trade_cn'] = $setsqlarr['trade_cn'];
         $jobarr['scale'] = $setsqlarr['scale'];
         $jobarr['scale_cn'] = $setsqlarr['scale_cn'];
         $jobarr['street'] = $setsqlarr['street'];
         $jobarr['street_cn'] = $setsqlarr['street_cn'];
         if (!$db->updatetable(table('jobs'), $jobarr, " uid=" . $setsqlarr['uid'] . "")) {
             exit('修改公司名稱出錯!');
         }
         if (!$db->updatetable(table('jobs_tmp'), $jobarr, " uid=" . $setsqlarr['uid'] . "")) {
             exit('修改公司名稱出錯!');
         }
         $soarray['trade'] = $jobarr['trade'];
         $soarray['scale'] = $jobarr['scale'];
開發者ID:source-hunter,項目名稱:74cms,代碼行數:31,代碼來源:wap_user.php

示例10: intval

 $setsqlarr['uid'] = intval($_SESSION['uid']);
 $setsqlarr['fullname'] = trim($_POST['fullname']) ? trim($_POST['fullname']) : exit("請填寫真實姓名");
 $setsqlarr['display_name'] = intval($_POST['display_name']);
 $setsqlarr['sex'] = trim($_POST['sex']) ? trim($_POST['sex']) : exit("請選擇性別");
 $setsqlarr['sex_cn'] = trim($_POST['sex_cn']) ? trim($_POST['sex_cn']) : exit("請選擇性別");
 $setsqlarr['birthdate'] = intval($_POST['birthdate']) ? intval($_POST['birthdate']) : exit("請選擇出生年份");
 $setsqlarr['residence'] = trim($_POST['residence']) ? trim($_POST['residence']) : exit("請選擇現居住地");
 $setsqlarr['residence'] = trim($_POST['residence']) ? trim($_POST['residence']) : exit("請選擇現居住地");
 $setsqlarr['education'] = intval($_POST['education']) ? intval($_POST['education']) : exit("請選擇獲得學曆");
 $setsqlarr['education_cn'] = trim($_POST['education_cn']) ? trim($_POST['education_cn']) : exit("請選擇獲得學曆");
 $setsqlarr['experience'] = intval($_POST['experience']) ? intval($_POST['experience']) : exit("請選擇工作經驗");
 $setsqlarr['experience_cn'] = trim($_POST['experience_cn']) ? trim($_POST['experience_cn']) : exit("請選擇工作經驗");
 $setsqlarr['email'] = trim($_POST['email']) ? trim($_POST['email']) : exit("請填寫郵箱");
 $setsqlarr['email_notify'] = $_POST['email_notify'] == "1" ? 1 : 0;
 $setsqlarr['telephone'] = trim($_POST['telephone']) ? trim($_POST['telephone']) : exit("請填寫手機");
 $db->updatetable(table('resume'), $setsqlarr, " id='" . intval($_POST['pid']) . "'  AND uid='{$setsqlarr['uid']}'");
 check_resume($_SESSION['uid'], intval($_REQUEST['pid']));
 if ($_CFG['audit_edit_resume'] != "-1") {
     set_resume_entrust(intval($_REQUEST['pid']));
 }
 write_memberslog($_SESSION['uid'], 2, 1105, $_SESSION['username'], "修改了簡曆({$_POST['title']})");
 $infoarr['realname'] = $setsqlarr['fullname'];
 $infoarr['sex'] = $setsqlarr['sex'];
 $infoarr['sex_cn'] = $setsqlarr['sex_cn'];
 $infoarr['birthday'] = $setsqlarr['birthdate'];
 $infoarr['residence'] = $setsqlarr['residence'];
 $infoarr['residence'] = $setsqlarr['residence'];
 $infoarr['education'] = $setsqlarr['education'];
 $infoarr['education_cn'] = $setsqlarr['education_cn'];
 $infoarr['experience'] = $setsqlarr['experience'];
 $infoarr['experience_cn'] = $setsqlarr['experience_cn'];
開發者ID:source-hunter,項目名稱:74cms,代碼行數:31,代碼來源:wap_user.php

示例11: trim

 }
 $setsqlarr['email'] = trim($_POST['email']) ? trim($_POST['email']) : exit('請填寫聯係郵箱!');
 $setsqlarr['contents'] = trim($_POST['contents']) ? trim($_POST['contents']) : exit('請填寫公司簡介!');
 $setsqlarr['contact_show'] = 1;
 $setsqlarr['email_show'] = 1;
 $setsqlarr['telephone_show'] = 1;
 $setsqlarr['address_show'] = 1;
 if ($_CFG['company_repeat'] == "0") {
     $info = $db->getone("SELECT uid FROM " . table('company_profile') . " WHERE companyname ='{$setsqlarr['companyname']}' AND uid<>'{$_SESSION['uid']}' LIMIT 1");
     if (!empty($info)) {
         exit("{$setsqlarr['companyname']}已經存在,同公司信息不能重複注冊");
     }
 }
 if ($company_info) {
     $_CFG['audit_edit_com'] != "-1" ? $setsqlarr['audit'] = intval($_CFG['audit_edit_com']) : '';
     if ($db->updatetable(table('company_profile'), $setsqlarr, " uid={$_SESSION['uid']}")) {
         $jobarr['companyname'] = $setsqlarr['companyname'];
         $jobarr['trade'] = $setsqlarr['trade'];
         $jobarr['trade_cn'] = $setsqlarr['trade_cn'];
         $jobarr['scale'] = $setsqlarr['scale'];
         $jobarr['scale_cn'] = $setsqlarr['scale_cn'];
         $jobarr['street'] = $setsqlarr['street'];
         $jobarr['street_cn'] = $setsqlarr['street_cn'];
         if (!$db->updatetable(table('jobs'), $jobarr, " uid=" . $setsqlarr['uid'] . "")) {
             exit('修改公司名稱出錯!');
         }
         if (!$db->updatetable(table('jobs_tmp'), $jobarr, " uid=" . $setsqlarr['uid'] . "")) {
             exit('修改公司名稱出錯!');
         }
         if (!$db->updatetable(table('jobfair_exhibitors'), array('companyname' => $setsqlarr['companyname']), " uid=" . $setsqlarr['uid'] . "")) {
             exit('修改公司名稱出錯!');
開發者ID:winiceo,項目名稱:fenzhan,代碼行數:31,代碼來源:user.php


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