本文整理匯總了PHP中SqlHelper::execute_dql1方法的典型用法代碼示例。如果您正苦於以下問題:PHP SqlHelper::execute_dql1方法的具體用法?PHP SqlHelper::execute_dql1怎麽用?PHP SqlHelper::execute_dql1使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SqlHelper
的用法示例。
在下文中一共展示了SqlHelper::execute_dql1方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$sql = "UPDATE " . $GLOBALS['ecs']->table('affiliate_log') . " SET separate_type = '{$flag}'" . " WHERE log_id = '{$logid}'";
$db->query($sql);
}
$links[] = array('text' => $_LANG['affiliate_ck'], 'href' => 'affiliate_ck.php?act=list');
sys_msg($_LANG['edit_ok'], 0, $links);
} elseif ($_REQUEST['act'] == 'separate') {
include_once ROOT_PATH . 'includes/lib_order.php';
require_once 'SqlHelper.php';
$sqlhelper = new SqlHelper();
$affiliate = unserialize($GLOBALS['_CFG']['affiliate']);
empty($affiliate) && ($affiliate = array());
$separate_by = $affiliate['config']['separate_by'];
$oid = (int) $_REQUEST['oid'];
$order_id = $oid;
//根據訂單Id求買家id
$user_id = $sqlhelper->execute_dql1("select user_id from ydcom_order_info where order_id={$order_id}");
//第1步查詢出該筆訂單的能產生的傭金
$fencheng1 = 0;
$fencheng2 = 0;
//根據order_id查表ydcom_order_goods中的goods_id
$res0 = $sqlhelper->execute_dql("select goods_id,goods_price from ydcom_order_goods where order_id={$order_id} ");
while ($row0 = mysql_fetch_array($res0)) {
$goods_id = $row0[0];
$goods_price = $row0[1];
//根據goods_id查ydcom_goods中的fengcheng1,和fengcheng2;
$res02 = $sqlhelper->execute_dql("select fencheng1,fencheng2 from ydcom_goods where goods_id={$goods_id} ");
while ($row02 = mysql_fetch_array($res02)) {
$fencheng1 += $row02[0] * $goods_price;
$fencheng2 += $row02[1] * $goods_price;
}
}