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


PHP Orders::findCount方法代码示例

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


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

示例1: Pages

<?php

/**
 *      [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
 *      The contents of this file are subject to the License; you may not use this file except in compliance with the License. 
 *
 *      @version $Revision: 2075 $
 */
require "../libraries/common.inc.php";
require "room.share.php";
require PHPB2B_ROOT . './libraries/page.class.php';
uses("order");
$page = new Pages();
$page->displaypg = 25;
$options = cache_read("typeoption");
setvar("pay_status", $options['common_option']);
setvar("order_status", $options['common_status']);
$conditions[] = "member_id=" . $the_memberid;
if (isset($_GET['action'])) {
    $action = trim($_GET['action']);
    if ($action == "cancel" && !empty($_GET['tradeno'])) {
        $pdb->Execute("DELETE FROM " . $tb_prefix . "orders WHERE trade_no='" . $_GET['tradeno'] . "' AND member_id='" . $the_memberid . "' AND pay_status='0'");
    }
}
$order = new Orders();
$amount = $order->findCount(null, $conditions);
$page->setPagenav($amount);
$result = $order->findAll("*", null, $conditions, " id desc", $page->firstcount, $page->displaypg);
setvar("ByPages", $page->pagenav);
setvar("datas", $result);
vtemplate("order");
开发者ID:reboxhost,项目名称:phpb2b,代码行数:31,代码来源:order.php

示例2: explode

                }
            }
            $tpl_file = "order.goods";
            $result = $pdb->GetArray($sql);
            if (!empty($result)) {
                $total_price = 0;
                for ($i = 0; $i < count($result); $i++) {
                    $tmp_str = explode("|", $result[$i]['content']);
                    if ($result[$i]['goods_id'] == "2" && strpos($result[$i]['content'], "|") === false) {
                        $total_price = $result[$i]['total_price'];
                        $result[$i]['price'] = $result[$i]['total_price'];
                        $result[$i]['charge'] = 1;
                    } else {
                        $total_price += $result[$i]['price'] * $result[$i]['amount'];
                    }
                }
                setvar("Items", $result);
                setvar("TotalPrice", $total_price);
            }
            template($tpl_file);
            exit;
        }
    }
}
$joins[] = "LEFT JOIN {$tb_prefix}members m ON m.id=Orders.member_id LEFT JOIN {$tb_prefix}memberfields mf ON mf.member_id=Orders.member_id";
$amount = $order->findCount($joins, null, "Orders.id");
$page->setPagenav($amount);
$result = $order->findAll("Orders.*,m.username,mf.first_name,mf.last_name as true_name", $joins, $conditions, " Orders.id DESC", $page->firstcount, $page->displaypg);
setvar("Items", $result);
setvar("ByPages", $page->pagenav);
template($tpl_file);
开发者ID:reboxhost,项目名称:phpb2b,代码行数:31,代码来源:order.php


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