本文整理汇总了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;
示例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;
}
示例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'];
示例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);