{
/* 搜索条件 */
$conditions = "1 = 1";搜狗电脑知识网
if (trim($_GET['keyword']))
{
$str = "LIKE '%" . trim($_GET['keyword']) . "%'";
$conditions .= " AND (goods_name {$str} OR brand {$str} OR cate_name {$str})";
echo $conditions;
exit;
}
if ($_GET['character'])
{
switch ($_GET['character'])
{
case 'show':
$conditions .= " AND if_show = 1";
break;
case 'hide':
$conditions .= " AND if_show = 0";
break;
case 'closed':
$conditions .= " AND closed = 1";
break;
case 'recommended':
$conditions .= " AND g.recommended = 1";
break;
}
}
return $conditions;
}
在my_goods.app.php文件里面,申请开启网店。
大家一看就知道。
来张图。