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


PHP db_test類代碼示例

本文整理匯總了PHP中db_test的典型用法代碼示例。如果您正苦於以下問題:PHP db_test類的具體用法?PHP db_test怎麽用?PHP db_test使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了db_test類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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'];
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:10,代碼來源:getcusfenrun.php

示例2: saveFileid

 function saveFileid($dateid, $catid)
 {
     $dbfile = new db_test();
     if ($catid) {
         $query = "update tb_upload_category_list set fd_cat_dateid='{$dateid}'\n\t\t\twhere fd_cat_dateid='0' and fd_cat_id in({$catid})";
         $dbfile->query($query);
         //echo $query;
     }
     //return $query;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:10,代碼來源:AutogetFileimg.php

示例3: changecoupon

function changecoupon($listid, $no, $type, $money, $couponno, $authorid, $paycardid = null, $memo)
{
    $db = new db_test();
    switch ($type) {
        case "sale":
            $query = "insert into tb_couponglide  (\n\t\t          fd_couponglide_no , fd_couponglide_type , fd_couponglide_addmoney ,\n\t\t          fd_couponglide_lessmoney  , fd_couponglide_datetime , fd_couponglide_memo ,\n\t\t          fd_couponglide_man , fd_couponglide_couponno , fd_couponglide_authorid ,\n\t\t          fd_couponglide_paycardid ,fd_couponglide_listid\n\t\t          )values(\n\t\t          '{$no}' , '{$type}' , '0' , \n\t\t          '{$money}' , now() , '{$memo}' , \n\t\t          '{$loginstaname}' , '{$couponno}' , '{$authorid}' ,\n\t\t          '{$paycardid}' , '{$listid}'\n\t\t          )\n\t\t    ";
            $db->query($query);
            break;
        case "rebuy":
            $query = "insert into tb_couponglide  (\n\t\t          fd_couponglide_no , fd_couponglide_type , fd_couponglide_addmoney ,\n\t\t          fd_couponglide_lessmoney  , fd_couponglide_datetime , fd_couponglide_memo ,\n\t\t          fd_couponglide_man , fd_couponglide_couponno , fd_couponglide_authorid ,\n\t\t          fd_couponglide_paycardid ,fd_couponglide_listid\n\t\t          )values(\n\t\t          '{$no}' , '{$type}' , '{$money}' , \n\t\t          '0' , now() , '{$memo}' , \n\t\t          '{$loginstaname}' , '{$couponno}' , '{$authorid}' ,\n\t\t          '{$paycardid}' , '{$listid}'\n\t\t          )\n\t\t    ";
            $db->query($query);
            break;
        case "use":
            $query = "insert into tb_couponglide  (\n\t\t          fd_couponglide_no , fd_couponglide_type , fd_couponglide_addmoney ,\n\t\t          fd_couponglide_lessmoney  , fd_couponglide_datetime , fd_couponglide_memo ,\n\t\t          fd_couponglide_man , fd_couponglide_couponno , fd_couponglide_authorid ,\n\t\t          fd_couponglide_paycardid ,fd_couponglide_listid\n\t\t          )values(\n\t\t          '{$no}' , '{$type}' , '0' , \n\t\t          '0' , now() , '{$memo}' , \n\t\t          '{$loginstaname}' , '{$couponno}' , '{$authorid}' ,\n\t\t          '{$paycardid}' , '{$listid}'\n\t\t          )\n\t\t    ";
            $db->query($query);
            break;
    }
}
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:18,代碼來源:changecouponglide.php

示例4: db_test

<?php

require "../include/common.inc.php";
$db = new db_test();
$gotourl = "app_interface_b.php?listid={$listid}";
switch ($type) {
    case "save":
        //echo $intfid."aaaaa</br>";
        $query = "select * from web_test_interface where fd_interface_appmenuid = 0 and fd_interface_id =" . $intfid;
        $db->query($query);
        if ($db->nf()) {
            $query = "update web_test_interface set fd_interface_appmenuid = {$listid} where fd_interface_id =" . $intfid;
            //echo $query;exit;
            $db->query($query);
            require "../include/alledit.2.php";
            Header("Location: {$gotourl}");
        } else {
            echo "<script>alert('該接口已經被綁定,請查證!');location.href='{$gotourl}'</script>";
        }
        break;
    case "jb":
        $query = "update web_test_interface set fd_interface_appmenuid = 0 where fd_interface_id = " . $intfid;
        $db->query($query);
        require "../include/alledit.2.php";
        Header("Location: {$gotourl}");
        break;
    case "delete":
        $query = "delete from web_test_interface where fd_interface_id='{$intfid}'";
        $db->query($query);
        require "../include/alledit.2.php";
        Header("Location: {$gotourl}");
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:interf_updateid.php

示例5: db_test

<?php

$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";
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:yewupayset.php

示例6: db_test

<?php

$thismenucode = "6n003";
require "../include/common.inc.php";
$db = new db_test();
$db2 = new db_test();
$db3 = new db_test();
$gourl = "salerreward.php";
if ($money) {
    $arr_money = explode("/", $money);
}
switch ($act) {
    case "new":
        $query = "insert into tb_salerrewards(fd_rewards_selfmoney,fd_rewards_tcsendtime,fd_rewards_allmoney,\n\t\t\t\t\t\t\t\t\t\t  fd_rewards_bmonth,fd_rewards_emonth,fd_rewards_sendphonemsg)\n\t          values('{$arr_money['0']}','{$tcsendtime}','{$arr_money['1']}','{$bmonth}','{$emonth}','{$sendphonemsg}')";
        $db->query($query);
        echo "<script>alert('保存成功!');location.href='{$gourl}'</script>";
        break;
    case "edit":
        $query = "update tb_salerrewards set \n\t          fd_rewards_selfmoney ='{$arr_money['0']}', fd_rewards_tcsendtime ='{$tcsendtime}',fd_rewards_allmoney ='{$arr_money['1']}',\n\t\t\t  fd_rewards_bmonth='{$bmonth}'       , fd_rewards_emonth='{$emonth}'      ,fd_rewards_sendphonemsg='{$sendphonemsg}'\n\t\t\t  where fd_rewards_id  = '{$rewardsid}'";
        $db->query($query);
        echo "<script>alert('修改成功!');location.href='{$gourl}'</script>";
        break;
}
$t = new Template(".", "keep");
$t->set_file("template", "salerreward.html");
$query = "select * from  tb_salerrewards ";
$db->query($query);
if ($db->nf()) {
    $db->next_record();
    $rewardsid = $db->f(fd_rewards_id);
    $selfmoney = $db->f(fd_rewards_selfmoney);
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:salerreward.php

示例7: header

<?php

require "../include/common.inc.php";
header('Content-Type:text/html;charset=GB2312');
$db = new db_test();
$dbshop = new db_shop();
//left join tb_shopkcquantity on fd_skqy_shopid=fd_shop_id and fd_skqy_procatalogid='$procaid'
$query = "select fd_shop_province from tb_shop \n\t\t\n\t\twhere fd_shop_isstop='0' and fd_shop_state='5' and fd_shop_iswebhidden  = 0 ";
$dbshop->query($query);
if ($dbshop->nf()) {
    while ($dbshop->next_record()) {
        $arr_provincescode[] = $dbshop->f(fd_shop_province);
    }
}
$provincescode = implode(",", $arr_provincescode);
$query = "select fd_provinces_code,fd_provinces_name from tb_provinces where fd_provinces_code in({$provincescode})";
$db->query($query);
$i = 1;
if ($db->nf()) {
    while ($db->next_record()) {
        $provincescode = $db->f(fd_provinces_code);
        $provincesname = $db->f(fd_provinces_name);
        $showcheck .= '<font style="width:30px;"><input type="checkbox" title="' . $provincesname . '" name="arr_provinces[]" onclick="readmarketingparam(\'' . $procaid . '\')" 
		value="' . $provincescode . '">' . $provincesname . '</font>';
        if ($i % 12 == 0) {
            $showcheck .= "<br/>";
        }
        $i++;
    }
}
echo $showcheck;
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:readshopprovince.php

示例8: header

<?php

header('Content-Type: application/x-www-form-urlencoded');
header('Content-Type: text/html;charset=gb2312');
require "../include/common.inc.php";
require_once '../include/json.php';
$db = new db_test();
$count = 0;
if ($type != 'checkdetail') {
    $idwhere = "fd_authorbkcard_authorid='{$listid}'";
} else {
    $idwhere = "fd_authorbkcard_paycardid='{$listid}'";
}
$aColumns = array("", "fd_bank_name", "fd_authorbkcard_no", "fd_authorbkcard_cardname", "fd_authorbkcard_ckr", "fd_paycard_key");
$sSearch = u2g($sSearch);
$sWhere = "";
if ($sSearch != "") {
    $sWhere = "and  (";
    for ($i = 1; $i < count($aColumns); $i++) {
        $sWhere .= $aColumns[$i] . " LIKE '%" . trim($sSearch) . "%' OR ";
    }
    $sWhere = substr_replace($sWhere, "", -3);
    $sWhere .= ')';
}
/* Individual column filtering */
for ($i = 1; $i < count($aColumns); $i++) {
    $b_s = "bSearchable_" . $i;
    $s_s = "sSearch_" . $i;
    if (${$b_s} == "true" && ${$s_s} != '') {
        if ($sWhere == "") {
            $sWhere = "AND ";
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:readauthorbank.php

示例9: db_test

<?php

$thismenucode = "10n004";
require "../include/common.inc.php";
$db = new db_test();
$t = new Template(".", "keep");
$t->set_file("template", "payfeelist.html");
$query = "select sum(fd_payfee_addmoney) as alladdmoney,sum(fd_payfee_lessmoney) as alllessmoney  from tb_payfeelist";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $alladdmoney = $db->f(alladdmoney);
        $alllessmoney = $db->f(alllessmoney);
        $allmoney = $alladdmoney + $alllessmoney;
    }
}
$checkall = '<INPUT onclick=CheckAll() type=checkbox class=checkbox value=on name=chkall>';
$arr_text = array("流水編號", "刷卡器設備號", "手續費", "交易方式", "時間");
for ($i = 0; $i < count($arr_text); $i++) {
    $theadth .= ' <th>' . $arr_text[$i] . '</th>';
}
$arr_titlename = array("tb_repaymoneyglist" => "貸款還款支付手續費", "tb_creditcardglist" => "信用卡還款支付手續費", "tb_transfermoneyglist" => "轉賬匯款支付手續費");
$query = "select fd_payfee_tabname from tb_payfeelist group by fd_payfee_tabname";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $arr_tabname[] = $db->f(fd_payfee_tabname);
    }
}
for ($i = 0; $i < count($arr_tabname); $i++) {
    $key = $arr_tabname[$i];
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:payfeelist.php

示例10: header

<?php

header('Content-Type: application/x-www-form-urlencoded');
header('Content-Type: text/html;charset=gb2312');
require "../include/common.inc.php";
require_once '../include/json.php';
require "../function/changekg.php";
$db = new db_test();
$query = "select * from web_orderdetail \n        left join  web_order on fd_order_id                = fd_orderdetail_orderid\n        where fd_orderdetail_id='{$id}'";
$db->query($query);
if ($db->nf()) {
    $db->next_record();
    $state = $db->f(fd_order_state);
}
if ($state > 1) {
    echo "0@@" . $query;
    exit;
}
$query = "update web_orderdetail set fd_orderdetail_quantity = '{$value}'  where fd_orderdetail_id = '{$id}'";
$db->query($query);
echo "1@@" . $value . $query;
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:21,代碼來源:changeordernum.php

示例11: db_test

<?php

$thismenucode = "2n501";
require "../include/common.inc.php";
require "../function/changecouponglide.php";
$db = new db_test();
if ($type == "check") {
    $gourl = "tb_creditcard_h_b.php";
    $titlename = "信用卡還款支付曆史";
} elseif ($type == "error") {
    $gourl = "tb_creditcard_error_b.php";
    $titlename = "信用卡還款支付異常";
} else {
    $gourl = "tb_creditcard_sp_b.php";
    $titlename = "信用卡還款支付複核";
    $note = "<div style='margin-top:10px; font-size:12px; color:#060'>注意:銀聯代付還沒有完成前,不能提交審核,請先通過代付款申請付款這筆單據!</div>";
}
if ($gotype == "sp") {
    $gourl = "tb_creditcard_sp_b.php";
    $titlename = "信用卡還款支付異常";
}
$gotourl = $gourl . $tempurl;
require "../include/alledit.1.php";
//,fd_ccglist_sendsms='$sendsms',fd_ccglist_shoucardmemo='$shoucardmemo'
switch ($action) {
    case "pass":
        //編輯記錄
        $query = "update tb_creditcardglist set\n\t\tfd_ccglist_state='{$isok}',fd_ccglist_qrdatetime=now(), fd_ccglist_qrman='{$loginstaname}' \n\t\twhere fd_ccglist_id={$listid}";
        $db->query($query);
        $query1 = "select * from tb_creditcardglist \n\t\t   left join tb_paycard on fd_ccglist_paycardid = fd_paycard_id\n\t\t   where fd_ccglist_id={$listid} ";
        $db->query($query1);
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:creditcard_sp.php

示例12: Template

<?php

$thismenucode = "2002";
require "../include/common.inc.php";
$t = new Template(".", "keep");
$t->set_file("dept_framework", "dept_framework.ihtml");
$db = new db_test();
//$menufile = "menuarryfile.php" ;
//$menuarry = file($menufile);
$num = 0;
$query = "select * from tb_dept order by fd_dept_id asc ";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $deptid = $db->f(fd_dept_id);
        $fid = $db->f(fd_dept_fid);
        $name = $db->f(fd_dept_name);
        $arr_deptid[$num] = $deptid;
        $arr_fid[$num] = $fid;
        $arr_name[$num] = $name;
        //if($fid!=0){
        $arr_isunder[$fid] = 1;
        //}
        $num++;
    }
}
for ($i = 0; $i < count($arr_deptid); $i++) {
    $a = $arr_deptid[$i];
    $arrall[$a][code] = $a;
    if (empty($arr_fid[$i])) {
        $arrall[$a][fcode] = 0;
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:dept_framework.php

示例13: header

<?php

require "../include/common.inc.php";
require "../include/json.php";
header('Content-Type:text/html;charset=utf-8');
$db = new db_test();
$prov = u2g(unescape($prov));
$query = "select fd_china_city as city  from tb_china  where fd_china_prov = '{$prov}'\n                   group by fd_china_city order by fd_china_areacode asc";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $arr_city_code = g2u($db->f(city));
        $arr_city_name = g2u($db->f(city));
        $select[] = array("id" => $arr_city_code, "title" => $arr_city_name);
    }
}
if (empty($select)) {
    $select[] = array("id" => "", "title" => "");
}
echo json_encode($select);
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:20,代碼來源:readnewcity.php

示例14: db_test

<?php

require "../include/common.inc.php";
$db = new db_test();
if (!empty($listid)) {
    $query = "UPDATE tb_paymoneylist SET fd_pymylt_times = " . ($times + 1) . " WHERE fd_pymylt_id = " . $listid;
    $db->query($query);
    echo 'success';
} else {
    echo 'failure';
}
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:11,代碼來源:ajaxdate.php

示例15: setUp

 function setUp()
 {
     $this->image =& db_table_factory::instance('test_image');
     $this->image_variation =& db_table_factory::instance('test_image_variation');
     $this->media =& db_table_factory::instance('test_media');
     parent::setUp();
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:7,代碼來源:db_table_cascade_delete_test.class.php


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