本文整理汇总了PHP中Orders::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Orders::select方法的具体用法?PHP Orders::select怎么用?PHP Orders::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orders
的用法示例。
在下文中一共展示了Orders::select方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
if (!Login::verifyLogin()) {
header("Location: ../../home/login/index");
exit;
}
$user_id = "";
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];
if (!empty($user_id)) {
$user_data = Login::verify_login($user_id);
if (!empty($user_data)) {
// var_dump($user_data);
$this->assign('user_data', $user_data);
}
}
}
$m_order = new Orders();
$field = array('ord.id', 'ord.order_no', 'ord.created', 'ord.status', 'ord.product_id', 'ord.qty', 'ord.freight', 'pr.product_url', 'pr.title_cn', 'pr.title_th', 'pr.category_3_id', 'pr.floor_3_id', 'pr.image_url', 'pr.product_url', 'pr.shop', 'pr.shop_id', 'pr.shop_url', 'pr.product_id', 'pr.status', 'pr.category_1_id', 'pr.sales_price');
$m_order->clear();
$m_order->setField($field);
$m_order->setTable(' vcb_order as ord');
$m_order->setJoin(' vcb_product as pr ', 'ord.product_id=pr.product_id');
$count = $m_order->getRowsCount();
//var_dump($count);
$page = new Page($count, 5);
$parameter = array();
$page->setParameter($parameter);
$showPage = $page->showPage();
$showTotal = $page->showTotal();
//var_dump($showPage);
//var_dump($showTotal);
$m_order->setPage();
$page->setListRows(5);
$m_order->setWhere('ord.user_id', '=', $user_id);
$m_order->setWhere('ord.status', '!=', 60000);
$m_order->setLimit($page->listRows);
$order_data = $m_order->select();
// var_dump($order_data);
/* $product_data = array();
$m_product = new products();
for($i = 0;$i<count($order_data);$i++){
$product_data[$i] = $m_product->getproducts_id($order_data[$i]['product_id']);
} */
//var_dump($product_data);
$this->assign('order_data', $order_data);
$this->assign('showPage', $showPage);
$this->assign('showTotal', $showTotal);
//$this->assign('pro_data', $product_data);
}
示例2: actionIndex
public function actionIndex($id = null)
{
$model = new Orders();
$max_id = $model->max_id();
if (is_numeric($id) || is_null($id)) {
if (empty($id)) {
$migr_select = $model->select();
} else {
$migr_select = $model->select_where($id);
}
}
$this->render('index', array('migr_selects' => $migr_select, 'max_id' => $max_id, 'order_id' => $id));
}
示例3: Orders
<?php
require_once 'tables.php';
header('Content-Type: text/event-stream');
header('Cache-Control: no-cache');
$order = new Orders();
$totalRes = $order->select();
/*
if ($_GET['code'] == "1" ){
$user->uid = $_GET['UID'] ;
$user->delete() ;
};
*/
//if(){
$limit = isset($_GET['limit']) ? $_GET['limit'] : 0;
// echo $limit ;
// echo $_GET['code'] ;
$res = $order->selectLimit($limit, 2);
$ordersArray = array();
for ($i = 0; $i < count($res); $i++) {
$ordersArray[$i]['date'] = $res[$i][0];
$ordersArray[$i]['name'] = $res[$i][1];
$ordersArray[$i]['room'] = $res[$i][2];
$ordersArray[$i]['ext'] = $res[$i][3];
$ordersArray[$i]['amount'] = $res[$i][4];
$ordersArray[$i]['oid'] = $res[$i][5];
$product = new orderProducts();
$product->oid = $ordersArray[$i]['oid'];
$Oproducts = $product->selectByOrderId();
$arr = array();
for ($j = 0; $j < count($Oproducts); $j++) {