本文整理汇总了PHP中DB_test::update方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_test::update方法的具体用法?PHP DB_test::update怎么用?PHP DB_test::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_test
的用法示例。
在下文中一共展示了DB_test::update方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: authorBindAgent
public function authorBindAgent()
{
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$agentno = $arr_body['agentno'];
$authorid = $arr_channelinfo['authorid'];
$agentno = strtolower($agentno);
$query = "select fd_cus_id as cusid ,fd_cus_no as cusno,fd_cus_name as cusname from tb_customer where fd_cus_no = '{$agentno}'";
$db->query($query);
if ($db->nf() > 0) {
$array_cus = $db->get_one($query);
$array_cus = auto_charset($array_cus, 'gbk', 'utf-8');
$dateArray['fd_author_bdagentid'] = $array_cus['cusid'];
$dateArray['fd_author_bdagentno'] = $array_cus['cusno'];
$dateArray['fd_author_bdagenttime'] = date("Y-m-d H:i:s");
$wherequery = "fd_author_id = '{$authorid}'";
$db->update("tb_author", $dateArray, $wherequery);
$arr_message = array("result" => "success", "message" => "恭喜您,绑定代理商成功!");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
} else {
$retmessage = "代理商代号不存在,请验证";
$arr_message = array("result" => "failure", "message" => $retmessage);
$retcode = "200";
//反馈状态 0 成功 200 自定义错误
}
$arr_msg['msgbody']['agentno'] = $array_cus['cusno'];
$arr_msg['msgbody']['agentname'] = $array_cus['cusname'];
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例2: authorMenuCount
public function authorMenuCount()
{
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$appmnuid = $arr_body['appmnuid'];
$authorid = $arr_channelinfo['authorid'];
$query = "select fd_appmnuc_count as count from tb_appmenucout where fd_appmnuc_authorid = '{$authorid}'\n and fd_appmnuc_appmnuid = '{$appmnuid}' ";
$db->query($query);
if ($db->nf()) {
$arr_val = $db->get_one($query);
$count = $arr_val['count'];
$querywhere = " fd_appmnuc_authorid = '{$authorid}'\n and fd_appmnuc_appmnuid = '{$appmnuid}'";
$dateArray['fd_appmnuc_count'] = $count + 1;
$db->update("tb_appmenucout", $dateArray, $querywhere);
} else {
$dateArray['fd_appmnuc_authorid'] = $authorid;
$dateArray['fd_appmnuc_appmnuid'] = $appmnuid;
$dateArray['fd_appmnuc_count'] = $memo;
$db->insert("tb_appmenucout", $dateArray);
}
$listid = $db->insert_id();
//取出刚插入的记录的主关键值的id
$arr_message = array("result" => "success", "message" => "插入数据成功!", "retcode" => "0");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例3: modifyAuthorInfo
public function modifyAuthorInfo()
{
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$authorid = trim($arr_channelinfo['authorid']);
$agentid = trim($arr_channelinfo['agentid']);
$autruename = u2g(trim($arr_body['autruename']));
$auidcard = trim($arr_body['auidcard']);
$auemail = trim($arr_body['auemail']);
$query = "update tb_author set fd_author_truename = '{$autruename}',fd_author_idcard = '{$auidcard}',\n\t\t\t fd_author_email = '{$auemail}' where fd_author_id = '{$authorid}' ";
$db->query($query);
$arr_merinfo['fd_cus_allname'] = $arr_body['agentcompany'];
$arr_merinfo['fd_cus_address'] = $arr_body['agentarea'];
$arr_merinfo['fd_cus_shaddress'] = $arr_body['agentaddress'];
$arr_merinfo['fd_cus_manphone'] = $arr_body['agentmanphone'];
$arr_merinfo['fd_cus_fax'] = $arr_body['agentfax'];
$wherequery = "fd_cus_id = '{$agentid}'";
$db->update("tb_customer", $arr_merinfo, $wherequery);
$arr_msg['msgbody'] = array("error_id" => "0", "result" => "success", "message" => "恭喜您,用户修改成功!");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例4: savePayCardinfo
public static function savePayCardinfo($paycardid)
{
$db = new DB_test();
$datetime = date("Y-m-d H:i:s");
$dataArray = array('fd_paycard_newspaydata' => $datetime);
$where = " fd_paycard_id = '{$paycardid}'";
$db->update("tb_paycard", $dataArray, $where);
return "1";
}