本文整理汇总了PHP中db_test::get_one方法的典型用法代码示例。如果您正苦于以下问题:PHP db_test::get_one方法的具体用法?PHP db_test::get_one怎么用?PHP db_test::get_one使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_test
的用法示例。
在下文中一共展示了db_test::get_one方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getareaauthornum
public function getareaauthornum($cusid, $month)
{
$db = new db_test();
$query = "select count(*) as activecardnum from tb_author\n where fd_author_bdagentid = '{$cusid}'\n and (fd_author_bdagenttime) like '%{$month}%'\n group by fd_author_bdagentid";
// echo $query;
if ($db->execute($query)) {
$arr_money = $db->get_one($query);
}
return $arr_money['activecardnum'];
}
示例2: Template
$thismenucode = "2k508";
require "../include/common.inc.php";
$db = new db_test();
$db2 = new db_test();
$db3 = new db_test();
$gotourl = "yewupayset.php";
$t = new Template(".", "keep");
$t->set_file("template", "yewupayset.html");
$t->set_block("template", "BXBK", "BXBKs");
$arr_text = array("编号", "业务类型", "交易规则", "操作");
for ($i = 0; $i < count($arr_text); $i++) {
$theadth .= ' <th>' . $arr_text[$i] . '</th>';
}
$query = "select * from tb_creditcardset";
$arr_creditcset = $db->get_one($query);
if ($arr_creditcset['fd_creditcset_whenpayfee'] = 'post') {
$showname = '通付宝刷卡时';
} else {
$showname = '支金代付款时';
}
$arr_cinput['creditcardset'] = "\n\t还信用卡刷卡金额 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_slotcardmoney'] . "</font></u> 元/笔,\n\t商户刷卡 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_dayslotcard'] . "</font></u> 次/月,\n\t月还款总限额 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_maxmoney'] . "</font></u> 元,\n\t单卡还款次数 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_monthslotcard'] . "</font></u> 次/月,";
if ($arr_creditcset['fd_creditcset_mode'] == 'fix') {
$arr_cinput['creditcardset'] .= "固定手续费 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_fee'] . "</font></u> 元/笔。";
} else {
$arr_cinput['creditcardset'] .= "\n\t最低费率额 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_minfee'] . "</font></u> ,\n\t最高费率额 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_maxfee'] . "</font></u> ,\n\t收取费率 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_sqfee'] . "</font></u> 。";
}
$query = "select * from tb_transfermoneyset where fd_transfermoneyset_tfmgtype = 'tfmg'";
$arr_transfermoneyset = $db->get_one($query);
$arr_cinput['transfermoneyset'] = "\n\t转账刷卡金额 <u><font color='#00CC00'>" . $arr_transfermoneyset['fd_transfermoneyset_slotcardmoney'] . "</font></u> 元/笔,\n\t转账刷卡次数 <u><font color='#00CC00'>" . $arr_transfermoneyset['fd_transfermoneyset_dayslotcardcount'] . "</font></u> 次/日 , \n\t转账月限额 <u><font color='#00CC00'>" . $arr_transfermoneyset['fd_transfermoneyset_datemaxcount'] . "</font></u> 元,\n\t\n\t";
if ($arr_transfermoneyset['fd_transfermoneyset_mode'] == 'fix') {
示例3: substr
<?php
require "../include/common.inc.php";
$db = new db_test();
$query = "select fd_couponset_fee as fee,fd_couponset_maxfee as maxfee from tb_couponset left join tb_arrive on fd_arrive_id =fd_couponset_arriveid";
$arr_couponset = $db->get_one($query);
$couponfee = substr($arr_couponset['fee'], 0, -1);
//¸¡¶¯ÊÖÐø·Ñ
$boolean = 0;
$query = "select\n case\n when fd_agpm_payfeedirct ='f' then fd_agpm_paymoney\n when fd_agpm_payfeedirct ='s' then (fd_agpm_paymoney-fd_agpm_payfee)\n else fd_agpm_paymoney END money,\n\n fd_agpm_bkordernumber as bkordernumber,\n fd_pymyltdetail_id as vid,\n fd_agpm_bkntno as bkntno,\n fd_paycard_key as paycardkey,\n fd_author_truename as author,\n fd_agpm_paytype as paytypee,\n fd_agpm_paydate as paydate,\n fd_agpm_shoucardno as shoucardno,\n fd_agpm_shoucardbank as shoucardbank,\n fd_agpm_shoucardman as shoucardman,\n fd_agpm_shoucardmobile as shoucardmobile,\n fd_agpm_current as current,\n fd_agpm_paymoney as paymoney ,\n fd_agpm_payfee as payfee,\n fd_agpm_arrivemode as arrivemode,\n fd_agpm_arrivedate as arrivedate,\n fd_paycardaccount_accountname as accountname,\n fd_sdcr_agentfee as sdcragentfee,\n fd_agpm_isagentpay as isagentpay,\n fd_paycardaccount_accountnum as accountnum," . "fd_agpm_authorid as authorid\n from tb_paymoneylistdetail\n left join tb_agentpaymoneylist on fd_pymyltdetail_agpmid = fd_agpm_id\n left join tb_paycard on fd_agpm_paycardid = fd_paycard_id\n left join tb_author on fd_author_id = fd_agpm_authorid\n left join tb_paycardaccount on fd_paycard_paycardaccount = fd_paycardaccount_id\n left join tb_sendcenter on fd_sdcr_id = fd_agpm_sdcrid\n where fd_pymyltdetail_paymoneylistid = '{$listid}'\n order by fd_agpm_bkntno";
$db->query($query);
$arr_result = $db->getFiledData('');
foreach ($arr_result as $key => $value) {
switch ($value['paytypee']) {
case 'coupon':
$table = 'couponsale';
$where = 'couponsale';
break;
case 'creditcard':
$table = 'creditcardglist';
$where = 'ccglist';
break;
case 'recharge':
$table = 'rechargeglist';
$where = 'rechargelist';
$paymoney = $value['paymoney'];
$authorid = $value['authorid'];
$paytype = $value['paytypee'];
$bkordernumber = $value['bkordernumber'];
$query = "update tb_authoraccount set fd_acc_money = fd_acc_money-{$paymoney} where fd_acc_authorid = '{$authorid}'";
$db->query($query);
示例4: Template
<?php
$thismenucode = "2k302";
require "../include/common.inc.php";
$db = new db_test();
$db2 = new db_test();
$db3 = new db_test();
$gotourl = $gourl . $tempurl;
$t = new Template(".", "keep");
$t->set_file("template", "payfeelist_view.html");
$arr_paytype = getauthorpaycardmenu();
$query = "select sum(fd_agpm_payfee) as allpayfee,sum(fd_agpm_payfee-fd_agpm_sdcrpayfeemoney-fd_agpm_sdcragentfeemoney) as allyingli from tb_agentpaymoneylist where fd_agpm_payrq='00' ";
$db->query($query);
$arr_data = $db->get_one($query);
$arr_text = array('刷卡器', '总手续费', '总利润额', "最后一次刷卡时间");
foreach ($arr_paytype as $value) {
$arr_text[] = $value;
}
$arr_text1 = array("手续费", "利润额");
for ($i = 0; $i < count($arr_text); $i++) {
$max = count($arr_text) - 1;
if (3 < $i) {
$colspan = "colspan=2";
foreach ($arr_text1 as $value) {
$theadth1 .= ' <th onclick="changeorderby(this,\'' . $i . '\')">' . $value . '</th>';
}
} else {
$colspan = "";
$theadth1 .= '<th onclick="changeorderby(this,\'' . $i . '\')"></th>';
}
$theadth .= ' <th ' . $colspan . '>' . $arr_text[$i] . '</th>';