本文整理汇总了PHP中SC_Query_Ex::setOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP SC_Query_Ex::setOrder方法的具体用法?PHP SC_Query_Ex::setOrder怎么用?PHP SC_Query_Ex::setOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC_Query_Ex
的用法示例。
在下文中一共展示了SC_Query_Ex::setOrder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lfGetOrderDetail
function lfGetOrderDetail($order_id)
{
$objQuery = new SC_Query_Ex();
$col = "product_id, product_class_id, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate";
$where = "order_id = ?";
$objQuery->setOrder("order_detail_id");
$arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id));
return $arrRet;
}
示例2: sfSendOrderMail
function sfSendOrderMail($order_id, $template_id, $subject = "", $header = "", $footer = "", $send = true)
{
$arrTplVar = new stdClass();
$arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
$arrTplVar->arrInfo = $arrInfo;
$objQuery = new SC_Query_Ex();
if ($subject == "" && $header == "" && $footer == "") {
// メールテンプレート情報の取得
$where = "template_id = ?";
$arrRet = $objQuery->select("subject, header, footer", "dtb_mailtemplate", $where, array($template_id));
$arrTplVar->tpl_header = $arrRet[0]['header'];
$arrTplVar->tpl_footer = $arrRet[0]['footer'];
$tmp_subject = $arrRet[0]['subject'];
} else {
$arrTplVar->tpl_header = $header;
$arrTplVar->tpl_footer = $footer;
$tmp_subject = $subject;
}
// 受注情報の取得
$where = "order_id = ?";
$arrRet = $objQuery->select("*", "dtb_order", $where, array($order_id));
$arrOrder = $arrRet[0];
$objQuery->setOrder('order_detail_id');
$arrTplVar->arrOrderDetail = $objQuery->select("*", "dtb_order_detail", $where, array($order_id));
$objProduct = new SC_Product_Ex();
$objQuery->setOrder('shipping_id');
$arrRet = $objQuery->select("*", "dtb_shipping", "order_id = ?", array($order_id));
foreach (array_keys($arrRet) as $key) {
$objQuery->setOrder('shipping_id');
$arrItems = $objQuery->select("*", "dtb_shipment_item", "order_id = ? AND shipping_id = ?", array($order_id, $arrRet[$key]['shipping_id']));
foreach ($arrItems as $itemKey => $arrDetail) {
foreach ($arrDetail as $detailKey => $detailVal) {
$arrRet[$key]['shipment_item'][$arrDetail['product_class_id']][$detailKey] = $detailVal;
}
$arrRet[$key]['shipment_item'][$arrDetail['product_class_id']]['productsClass'] =& $objProduct->getDetailAndProductsClass($arrDetail['product_class_id']);
}
}
$arrTplVar->arrShipping = $arrRet;
$arrTplVar->Message_tmp = $arrOrder['message'];
// 会員情報の取得
$customer_id = $arrOrder['customer_id'];
$objQuery->setOrder('customer_id');
$arrRet = $objQuery->select('point', "dtb_customer", "customer_id = ?", array($customer_id));
$arrCustomer = isset($arrRet[0]) ? $arrRet[0] : "";
$arrTplVar->arrCustomer = $arrCustomer;
$arrTplVar->arrOrder = $arrOrder;
//その他決済情報
if ($arrOrder['memo02'] != "") {
$arrOther = unserialize($arrOrder['memo02']);
foreach ($arrOther as $other_key => $other_val) {
if (SC_Utils_Ex::sfTrim($other_val['value']) == "") {
$arrOther[$other_key]['value'] = "";
}
}
$arrTplVar->arrOther = $arrOther;
}
// 都道府県変換
$arrTplVar->arrPref = $this->arrPref;
$objCustomer = new SC_Customer_Ex();
$arrTplVar->tpl_user_point = $objCustomer->getValue('point');
if (Net_UserAgent_Mobile::isMobile() === true) {
$objMailView = new SC_MobileView_Ex();
} else {
$objMailView = new SC_SiteView_Ex();
}
// メール本文の取得
$objMailView->assignobj($arrTplVar);
$body = $objMailView->fetch($this->arrMAILTPLPATH[$template_id]);
// メール送信処理
$objSendMail = new SC_SendMail_Ex();
$bcc = $arrInfo['email01'];
$from = $arrInfo['email03'];
$error = $arrInfo['email04'];
$tosubject = $this->sfMakeSubject($tmp_subject, $objMailView);
$objSendMail->setItem('', $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc);
$objSendMail->setTo($arrOrder["order_email"], $arrOrder["order_name01"] . " " . $arrOrder["order_name02"] . " 様");
// 送信フラグ:trueの場合は、送信する。
if ($send) {
if ($objSendMail->sendMail()) {
$this->sfSaveMailHistory($order_id, $template_id, $tosubject, $body);
}
}
return $objSendMail;
}
示例3: getAllPlugin
/**
* インストールされているプラグインを取得する。
*/
function getAllPlugin()
{
$objQuery = new SC_Query_Ex();
$col = '*';
$table = 'dtb_plugin';
$where = 'del_flg = 0';
// XXX 2.11.0 互換のため
$arrCols = $objQuery->listTableFields($table);
if (in_array('rank', $arrCols)) {
$objQuery->setOrder('rank DESC');
}
$arrRet = $objQuery->select($col, $table, $where);
return $arrRet;
}