本文整理汇总了PHP中get_where_sql函数的典型用法代码示例。如果您正苦于以下问题:PHP get_where_sql函数的具体用法?PHP get_where_sql怎么用?PHP get_where_sql使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_where_sql函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_quotation_where
function get_quotation_where($filter)
{
include_once ROOT_PATH . ADMIN_PATH . '/includes/lib_main.php';
$_filter = new StdClass();
$_filter->cat_id = $filter['cat_id'];
$_filter->brand_id = $filter['brand_id'];
$_filter->keyword = $filter['keyword'];
$where = get_where_sql($_filter);
return $where;
}
开发者ID:dw250100785,项目名称:ECShop-1,代码行数:10,代码来源:quotation.php
示例2: get_quotation_where
function get_quotation_where($filter)
{
include_once ROOT_PATH . ADMIN_PATH_M . '/includes/lib_main.php';
$_filter = new StdClass();
$_filter->cat_id = $filter['cat_id'];
$_filter->brand_id = $filter['brand_id'];
$where = get_where_sql($_filter);
$_filter->keyword = $filter['keyword'];
$where .= isset($_filter->keyword) && trim($_filter->keyword) != '' ? " AND (g.goods_name LIKE '%" . mysql_like_quote($_filter->keyword) . "%' OR g.goods_sn LIKE '%" . mysql_like_quote($_filter->keyword) . "%' OR g.goods_id LIKE '%" . mysql_like_quote($_filter->keyword) . "%') " : '';
return $where;
}
开发者ID:moonlight-wang,项目名称:feilun,代码行数:11,代码来源:quotation.php
示例3: get_goods_list
/**
* 取得商品列表:用于把商品添加到组合、关联类、赠品类
* @param object $filters 过滤条件
*/
function get_goods_list($filter)
{
$filter->keyword = json_str_iconv($filter->keyword);
$where = get_where_sql($filter);
// 取得过滤条件
/* 取得数据 */
$sql = 'SELECT goods_id, goods_name, shop_price ' . 'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' . $where . 'LIMIT 50';
$row = $GLOBALS['db']->getAll($sql);
return $row;
}
开发者ID:songtaiwu,项目名称:m-cmsold,代码行数:14,代码来源:lib_main.php
示例4: get_goods_list
/**
* 取得商品列表:用于把商品添加到组合、关联类、赠品类
* @param object $filters 过滤条件
*/
function get_goods_list($filter)
{
$filter->keyword = json_str_iconv($filter->keyword);
$where = get_where_sql($filter);
// 取得过滤条件
$suppid = isset($_GET['suppId']) && intval($_GET['suppId']) > 0 ? intval($_GET['suppId']) : $_SESSION['supplier_id'];
$where .= ' AND sgc.supplier_id=' . $suppid . ' group by g.goods_id ';
/* 取得数据 */
// $sql = 'SELECT goods_id, goods_name, shop_price '.
// 'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' . $where .
// 'LIMIT 50';
$sql = 'select g.goods_id,g.goods_name,g.shop_price ' . 'from ' . $GLOBALS['ecs']->table('supplier_goods_cat') . 'as sgc ' . 'left join ' . $GLOBALS['ecs']->table('goods') . 'as g on sgc.goods_id = g.goods_id' . $where . 'LIMIT 50';
$row = $GLOBALS['db']->getAll($sql);
return $row;
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:19,代码来源:lib_main.php
示例5: get_export_where_sql
/**
* 生成商品导出过滤条件
*
* @param array $filter 过滤条件数组
*
* @return string
*/
function get_export_where_sql($filter)
{
$where = '';
if (!empty($filter['goods_ids'])) {
$goods_ids = explode(',', $filter['goods_ids']);
if (is_array($goods_ids) && !empty($goods_ids)) {
$goods_ids = array_unique($goods_ids);
$goods_ids = "'" . implode("','", $goods_ids) . "'";
} else {
$goods_ids = "'0'";
}
$where = " WHERE g.is_delete = 0 AND g.goods_id IN (" . $goods_ids . ") ";
} else {
$_filter = new StdClass();
$_filter->cat_id = $filter['cat_id'];
$_filter->brand_id = $filter['brand_id'];
$_filter->keyword = $filter['keyword'];
$where = get_where_sql($_filter);
}
return $where;
}
开发者ID:noikiy,项目名称:mdwp,代码行数:28,代码来源:goods_export.php
示例6: get_goods_list
/**
* 取得商品列表:用于把商品添加到组合、关联类、赠品类
*
* @param object $filters
* 过滤条件
*/
function get_goods_list($filter)
{
$filter->keyword = json_str_iconv($filter->keyword);
$where = get_where_sql($filter);
// 取得过滤条件
/* 取得数据 */
$sql = 'SELECT goods_id, goods_name, shop_price ' . 'FROM ' . M()->pre . 'goods ' . ' AS g ' . $where . 'LIMIT 50';
$row = M()->query($sql);
return $row;
}
开发者ID:m7720647,项目名称:demo,代码行数:16,代码来源:function.php
注:本文中的get_where_sql函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论