本文整理汇总了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;
}
}