当前位置: 首页>>代码示例>>PHP>>正文


PHP db_test::nf方法代码示例

本文整理汇总了PHP中db_test::nf方法的典型用法代码示例。如果您正苦于以下问题:PHP db_test::nf方法的具体用法?PHP db_test::nf怎么用?PHP db_test::nf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在db_test的用法示例。


在下文中一共展示了db_test::nf方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: oldimgfile

 function AutogetFileimg_id($scatid, $id)
 {
     //global "";
     global $g_propic;
     $dbfile = new db_test();
     $query = "select * from tb_upload_category_list where fd_cat_scatid='{$scatid}' and fd_cat_id = '{$id}'";
     $dbfile->query($query);
     if ($dbfile->nf()) {
         $dbfile->next_record();
         $catid = $dbfile->f(fd_cat_id);
         $filename = $dbfile->f(fd_cat_name);
         $picname = $dbfile->f(fd_cat_url);
         $thumrul = $dbfile->f(fd_cat_thumurl);
         $display = $dbfile->f(fd_cat_display);
         $thumrul = str_replace("../", "", $thumrul);
         $vpic = "" . $thumrul;
         $returnarray = $vpic . "@@" . $catid;
     } else {
         $thisclass = new oldimgfile();
         //��ʼ����ʵ��
         $returnarray = $thisclass->readoldfiles($scatid, $dateid);
     }
     if ($returnarray == "" and ($scatid == 5 or $scatid == 35)) {
         $returnarray = $g_propic . "images/null.jpg@@";
     }
     return $returnarray;
 }
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:27,代码来源:AutogetFileimg.php

示例2:

<?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

示例3: while

<?php

header('Content-Type: application/x-www-form-urlencoded');
header('Content-Type: text/html;charset=utf-8');
require "../include/common.inc.php";
require_once '../include/json.php';
$db = new db_test();
$query = "select fd_paycard_salerid,count(*) as counts from tb_paycard  group by fd_paycard_salerid  ";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $id = $db->f(fd_paycard_salerid);
        //id号
        $arr_membercounts[$id] = g2u($db->f(counts));
    }
}
$aColumns = array("", "a.fd_saler_truename", "a.fd_saler_username", "a.fd_saler_phone", "b.fd_saler_truename", 'a.fd_saler_zjl');
$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;
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:31,代码来源:readsalerlist.php

示例4: getnewssaler

function getnewssaler($value)
{
    $db = new db_test();
    $query = "select fd_saler_truename from web_saler where fd_saler_id='{$value}'";
    $db->query($query);
    if ($db->nf()) {
        $db->next_record();
        $salername = $db->f(fd_saler_truename);
        return $salername;
    }
}
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:11,代码来源:readrobmemmanage.php

示例5: while

$db = new db_test();
$db1 = new db_test();
header('Content-Type:text/html;charset=GB2312');
$flagcomm = 0;
$query = "select * from tb_salelistdetail where fd_stdetail_seltid = '{$listid}'";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $paycardid = $db->f(fd_stdetail_paycardid);
        $productid = $db->f(fd_stdetail_productid);
        $saleprice = $db->f(fd_stdetail_price);
        $salequantity = $db->f(fd_stdetail_quantity);
        $query = "select * from tb_paycardstockquantity \n\t\t          where fd_skqy_commid = '{$productid}'";
        $db1->query($query);
        //查询仓库数量
        if ($db1->nf()) {
            $db1->next_record();
            $storagequantity = $db1->f(fd_skqy_quantity) + 0;
            if ($storagequantity < $salequantity) {
                //$tmpquantity = $salequantity - $storagequantity;
                $returnquantitypaycardid = $returnquantitypaycardid . "“" . $productid . "”当库存数量为:" . $storagequantity . "\n";
                $flagcomm = 1;
            }
        }
        $query = "select * from tb_storagecost \n\t\t          where fd_sect_commid = '{$productid}'";
        $db1->query($query);
        //查询平均价格
        if ($db1->nf()) {
            $db1->next_record();
            $storagecost = $db1->f(fd_sect_cost) + 0;
            if ($storagecost >= $saleprice) {
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:31,代码来源:readlistcost.php

示例6:

require "../include/common.inc.php";
$db = new db_test();
$db2 = new db_test();
$db3 = new db_test();
if (!empty($password)) {
    $password = md5($password);
}
switch ($action) {
    case "save":
        if (!empty($id)) {
            $query = "select * from tb_saler where fd_saler_id  = '{$id}'";
            $db->query($query);
            if ($db->nf()) {
                $query = "select * from tb_saler where fd_saler_username  = '{$username}' and fd_saler_id <> '{$id}'";
                $db2->query($query);
                if ($db2->nf() > 0) {
                    $error = "你输入用户名已被注册,请查证!";
                } else {
                    $query = "select * from tb_saler where fd_saler_phone   = '{$phone}' and fd_saler_id <> '{$id}'";
                    $db2->query($query);
                    if ($db2->nf() > 0) {
                        $error = "你输入手机已被注册,请查证!";
                    } else {
                        $query = "select * from tb_saler where fd_saler_idcard   = '{$idcard}' and fd_saler_id <> '{$id}'";
                        $db2->query($query);
                        if ($db2->nf() > 0) {
                            $error = "你输入身份证已被注册,请查证!";
                        } else {
                            $query = "update tb_saler set fd_saler_idcard ='{$idcard}',\n\t          fd_saler_truename ='{$truename}'                , fd_saler_phone ='{$phone}'                 , \n\t\t\tfd_saler_sharesalerid = '{$sharesalerid}'  ,\n\t\t\tfd_saler_username     = '{$username}'      ,\n\t\t\t  fd_saler_salertype     ='{$type}'               , fd_saler_state       = '1'          ,       \n\t\t\t  where fd_saler_id = '{$id}'";
                            $db->query($query);
                            if (!empty($password)) {
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:31,代码来源:salersp.php

示例7: getallpaymoney

function getallpaymoney()
{
    $db = new db_test();
    $query = "select sum(fd_agpm_paymoney) as paymoney\n\t\tfrom tb_agentpaymoneylist \n\t\twhere fd_agpm_payrq='00'";
    $db->query($query);
    if ($db->nf()) {
        while ($db->next_record()) {
            $allpaymoney = $db->f(paymoney);
        }
    }
    return $allpaymoney;
}
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:12,代码来源:function.php

示例8: checkdeptid

function checkdeptid($fid)
{
    $db1 = new db_test();
    $query = "select * from tb_dept where fd_dept_id != '{$fid}'";
    $db1->query($query);
    if ($db1->nf()) {
        $db1->next_record();
        $check_id = $db1->f(fd_dept_fid);
        checkdeptid($check_id);
    }
    return $check_id;
}
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:12,代码来源:dept.php

示例9: strtolower

header('Content-Type:text/html;charset=GB2312');
$value = strtolower($value);
$arr_chars = preg_split('//', $value, -1, PREG_SPLIT_NO_EMPTY);
for ($i = 0; $i < count($arr_chars); $i++) {
    if (ereg("[0-9]", $arr_chars[$i])) {
        $str_int .= $arr_chars[$i];
    }
}
for ($i = 0; $i < count($arr_chars); $i++) {
    if (ereg("[a-z]", $arr_chars[$i])) {
        $strchars .= $arr_chars[$i];
    }
}
$query = "select * from tb_supplier where fd_supp_no like '%" . $str_int . "%' and fd_supp_no like '%" . $strchars . "%' ";
$db->query($query);
$count = $db->nf();
if ($count == 0) {
    $returnflag = 0;
    $suppid = "";
    //供应商id号
    $suppname = "";
    //供应商名称
    $suppno = "";
    //供应商编号
    $suppcode = "";
    //供应商代号
} elseif ($count == 1) {
    $query = "select * from tb_supplier where fd_supp_no like '%" . $str_int . "%' and fd_supp_no like '%" . $strchars . "%'";
    $db->query($query);
    if ($db->nf()) {
        $db->next_record();
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:31,代码来源:checkisonesupp.php

示例10: Header

<?php

$thismenucode = "2k102";
require "../include/common.inc.php";
$db = new db_test();
$gourl = "tb_manufacturer_b.php";
$gotourl = $gourl . $tempurl;
require "../include/alledit.1.php";
switch ($action) {
    case "new":
        //新增记录
        $query = "select * from tb_manufacturer where fd_manu_name='{$name}' or fd_manu_allname='{$allname}'";
        $db->query($query);
        if ($db->nf() > 0) {
            $error = "此制造商已经存在,请重新输入!";
        } else {
            $query = "insert into tb_manufacturer (\n\t     \t\t\t   fd_manu_no, fd_manu_name  , fd_manu_allname  ,fd_manu_address,fd_manu_linkman,\n\t\t\t\t\t   fd_manu_manphone ,fd_manu_xingfen,fd_manu_workstatus\n\t     \t\t\t    )values(     \n\t     \t\t      '{$no}','{$name}'    ,'{$allname}', '{$address}','{$linkman}','{$manphone}','{$xingfen}',\n\t\t\t\t\t  '{$workstatus}'\n\t     \t\t      )";
            $db->query($query);
            require "../include/alledit.2.php";
            Header("Location: {$gotourl}");
        }
        break;
    case "delete":
        //删除记录
        $query = "delete  from tb_manufacturer where fd_manu_id='{$listid}'";
        $db->query($query);
        require "../include/alledit.2.php";
        Header("Location: {$gotourl}");
        break;
    case "edit":
        //编辑记录
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:31,代码来源:manufacturer.php

示例11: getauthormeal

function getauthormeal($type)
{
    $db = new db_test();
    $query = 'select fd_author_' . $type . ',count(fd_author_' . $type . ') as authornum from tb_author group by  fd_author_' . $type . '';
    $db->query($query);
    if ($db->nf()) {
        while ($db->next_record()) {
            $id = $db->f('fd_author_' . $type . '');
            $returnvalue[$id] = $db->f(authornum);
        }
    }
    return $returnvalue;
}
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:13,代码来源:readsetmeal.php

示例12: getusemoney

function getusemoney($authorid)
{
    $db = new db_test();
    $data = date("Y-m-d", time());
    $query = "select * from tb_slotcardmoneyreq\n\t\t\tleft join tb_slotcardmoneyset on fd_scdmset_id = fd_pmreq_paymsetid \n\t\t\twhere fd_pmreq_authorid='{$authorid}' and fd_pmreq_state='9' and fd_pmreq_reqdatetime like '{$data}%'";
    $db->query($query);
    if ($db->nf()) {
        //�жϲ�ѯ���ļ�¼�Ƿ�Ϊ��
        while ($db->next_record()) {
            //��ȡ��¼���
            $allreqmoney += $db->f(fd_pmreq_reqmoney);
        }
        return $allreqmoney;
    } else {
        return "0.00";
    }
}
开发者ID:Xiaoyuyexi,项目名称:client-server,代码行数:17,代码来源:function.inc.php


注:本文中的db_test::nf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。