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


PHP DB_test::num_rows方法代碼示例

本文整理匯總了PHP中DB_test::num_rows方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB_test::num_rows方法的具體用法?PHP DB_test::num_rows怎麽用?PHP DB_test::num_rows使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DB_test的用法示例。


在下文中一共展示了DB_test::num_rows方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: explode

if ($db->nf()) {
    $db->next_record();
    $paycardid = $db->f(fd_stdetail_paycardid);
    $arr_paycardid1 = explode(",", $paycardid);
    foreach ($arr_paycardid1 as $va) {
        if ($strpaycardid) {
            $strpaycardid .= "," . "'{$va}'";
        } else {
            $strpaycardid = "'{$va}'";
        }
    }
}
if ($strpaycardid) {
    $query = "SELECT fd_paycard_batches , fd_paycard_key , fd_product_suppname FROM tb_paycard LEFT JOIN tb_product ON fd_paycard_product = fd_product_id WHERE fd_paycard_id IN ({$strpaycardid})";
    $db->query($query);
    $rows2 = $db->num_rows();
    $t->set_block("salebackview", "prolist", "prolists");
    if ($db->nf()) {
        while ($db->next_record()) {
            $lprobatches = $db->f(fd_paycard_batches);
            //批次號
            $lprokey = $db->f(fd_paycard_key);
            //刷卡器設備號
            $lprosuppname = $db->f(fd_product_suppname);
            //供應商
            $count++;
            $trid = "tr" . $count;
            $imgid = "img" . $count;
            if ($s == 1) {
                $bgcolo = "#F1F4F9";
                $s = 0;
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:salebackprint.php

示例2: getPassenger

	function getPassenger()
	{
		
		$authorid = trim($this->arr_channelinfo['authorid']);									// 必填
		$type = trim($this->arr_body['type']);													// 必填
		if($authorid != "")
		{
			if($type == "1")																	// 讀取乘機人
			{
				$sql = "SELECT id, name, card_type AS cardType, card_id AS cardId, phone AS phoneNumber, type AS passengerType, gender FROM ctrip_airticket_passenger WHERE is_active = 1 AND user_id = " . $authorid;
			}
			else if($type == "2")																// 讀取聯係人
			{
				$sql = "SELECT id, name, phone AS phoneNumber FROM ctrip_airticket_contacter WHERE is_active = 1 AND user_id = " . $authorid;
			}
		}
		if(isset($sql))
		{
			$db = new DB_test();
			$db->query($sql);
			$arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
			$retcode = "0";
			$arr_message = array("result" => "success", "message" => "");
			if($db->num_rows() == 0)
			{
				$retcode = "200";
			$arr_message = array("result" => "fail", "message" => "沒有保存過相關信息");
			}
		}
		else
		{
			$arr_message = array("result" => "fail", "message" => "信息不完整");
		}
		$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;
	}
開發者ID:uin57,項目名稱:doc,代碼行數:39,代碼來源:ApiAirticket.php

示例3: Header

        Header("Location: {$gotourl}");
        break;
    default:
        break;
}
if (!empty($sel_condit)) {
    $querywhere .= " and " . $sel_condit . " like '%" . $txtCondit . "%'";
}
$t = new Template(".", "keep");
//調用一個模版
$t->set_file("selagentbkno", "selagentbkno.html");
//顯示列表
$t->set_block("selagentbkno", "prolist", "prolists");
$query = "select \n                 case \n                 when fd_agpm_paytype ='coupon' then '購買抵用券'\n                 when fd_agpm_paytype ='creditcard' then '信用卡還款'\n                 when fd_agpm_paytype ='recharge' then        '充值'\n                 when fd_agpm_paytype ='repay' then       '還貸款'\n                 when fd_agpm_paytype ='order' then '訂單付款'\n                 when fd_agpm_paytype ='tfmg' then '轉賬匯款'\n                 else '其他業務' END  paytype,\n\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_id               as agpm_id,\n                 fd_agpm_bkordernumber     as bkordernumber,\n                 fd_agpm_no               as agpm_no,\n                 fd_agpm_bkntno           as bkntno,\n                 fd_paycard_key           as paycardkey,\n                 fd_author_truename       as author,\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_sdcr_name             as sdcrname,\n                 fd_agpm_memo             as memo\n                 from tb_agentpaymoneylist\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_sendcenter on fd_sdcr_id = fd_agpm_sdcrid\n                 where fd_agpm_payrq = '00' and fd_agpm_state = 1  and (fd_agpm_paystate = 0  or fd_agpm_paystate is null ) and fd_agpm_paytype='{$paytype}' {$querywhere}\n                 order by fd_agpm_no";
$db->query($query);
$total = $db->num_rows($result);
pageft($total, 20, $url);
if ($firstcount < 0) {
    $firstcount = 0;
}
$query = "{$query} limit {$firstcount},{$displaypg}";
$db->query($query);
$rows = $db->num_rows();
$arr_result = $db->getFiledData('');
$count = 0;
foreach ($arr_result as $value) {
    $count++;
    $value['count'] = $count;
    $value['arrivemode'] = "T+" . $value['arrivemode'];
    $all_paymoney += $value['paymoney'];
    $all_payfee += $value['payfee'];
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:selagentbkno.php

示例4: while

} else {
    $where = 0;
}
$t->set_block("stockbackprint", "prolist", "prolists");
/*$query = "select fd_product_no               as lprono,
              fd_product_name 			 as lproname,
	 fd_skdetail_price           as lprice,
              fd_skdetail_id              as lstdetailid,
              fd_skdetail_quantity        as lquantity,
              fd_skdetail_memo            as lpromemo
	 from tb_paycardstockbackdetail  
              left join tb_product on fd_product_id = fd_skdetail_productid
       where fd_skdetail_stockid = '$listid'"; */
$query = "select * from tb_paycard \n\t\tleft join tb_paycardstockbackdetail on fd_skdetail_productid=fd_paycard_product\n\t\tleft join tb_product on fd_product_id = fd_skdetail_productid\n\t\twhere {$where} group by fd_paycard_id";
$db->query($query);
$rows = $db->num_rows();
$count = 0;
//商品記錄數
$prosumnum = 0;
//商品總數量
$prosumprice = 0;
//商品總價
if ($db->nf()) {
    while ($db->next_record()) {
        $lprono = $db->f(fd_product_no);
        //商品編號
        $lproname = $db->f(fd_product_name);
        //商品名稱
        $lprice = $db->f(fd_paycard_stockprice);
        //商品單價
        $lstdetailid = $db->f(fd_skdetail_id);
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:stockbackprint.php


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