Let's see how this code is modified.

Source: Internet
Author: User
Check how this code is modified // execute normal search
///*
If (isset ($ goods_param ['class']) {
$ Condition ['gc _ id _ '. $ goods_param ['class'] ['demo'] = $ 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 ['giput'] = 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: PAGESIZE );
}

The question now is, in the first if, $ condition, is it to query only one condition gc_id? I want him to query gc_id and gc_id1 at the same time. how can I modify it, just getting started


Reply to discussion (solution)

No one ,? Come and help me. thank you for posting it.

It depends on the $ condition in the architecture.

What does this sentence mean ,?
$ Condition ['gc _ id _ '. $ goods_param ['class'] ['demo'] = $ goods_param ['class'] ['gc _ id'];

It depends on the $ condition in the architecture.



Where should we look at the architecture? I am using the shopnc mall system.

Because the processing combinations in different architectures have different where conditions, we need to look at the underlying where processing. However, I feel that an open-source product should have corresponding operations.
Http://wenku.baidu.com/link? Url = Wak60lv0ReREdfCBMNFvsRmM0kFpUIwumfydaw0VKvnbM6APvSibwXSnmlQcxM_Xa0YqIgQitFahgwbr_5GsheP1f4FKT-46mXTLYRVs0EO
Pages 24 and 25

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.