本文整理匯總了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>';