See how this code changes

Source: Internet
Author: User
Perform a normal search
///*
if (isset ($goods _param[' class ')) {
$condition [' gc_id_ '. $goods _param[' class '] [' depth ']] = $goods _param[' class ' [' gc_id '];
}
//*/
if (Intval ($_get[' b_id ')) > 0) {
$condition [' brand_id '] = intval ($_get[' b_id ');
}
if ($_get[' keyword '! = ') {
$condition [' goods_name|goods_jingle '] = array (' Like ', '% '. $_get[' keyword '). '%');
}
if (Intval ($_get[' area_id ')) > 0) {
$condition [' areaid_1 '] = intval ($_get[' area_id ');
}
if ($_get[' type '] = = 1) {
$condition [' is_own_shop '] = 1;
}
if ($_get[' gift ') = = 1) {
$condition [' have_gift '] = 1;
}
if (isset ($goods _param[' Goodsid_array ')) {
$condition [' goods_id '] = Array (' In ', $goods _param[' Goodsid_array '));
}
$goods _list = $model _goods->getgoodslistbycolordistinct ($condition, $fields, $order, self::P agesize);
}

Now the problem is the first if in $condition this is not only query a condition gc_id, I want him to query gc_id and GC_ID1 at the same time, how to modify AH big God, I rookie A, just started to learn


Reply to discussion (solution)

No one, huh? Here, give me a hand, thanks for the hundred knot stickers.

This depends on how the architecture is $condition, so you can't see it.

What do you mean by that sentence?
$condition [' gc_id_ '. $goods _param[' class '] [' depth ']] = $goods _param[' class ' [' gc_id '];

This depends on how the architecture is $condition, so you can't see it.



Where do you see the architecture? I'm using the SHOPNC mall system.

Because the processing combinations within different schemas are different where conditions are, you need to look at the underlying where processing, but I feel that an open source product should have a corresponding operation
Http://wenku.baidu.com/link?url=Wak60lv0ReREdfCBMNFvsRmM0kFpUIwumfydaw0VKvnbM6APvSibwXSnmlQcxM_ Xa0yqigqitfahgwbr_5gshep1f4fkt-46mxtlyrvs0eo
Here 24, 25 pages

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.