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