Could you tell me how to write in statements for zendselect ()?

Source: Internet
Author: User
Ask how to write the in statement $ sales_id = implode (',', $ sales_id); // echo & nbsp; $ sale_id has a value of 4, 6, 7, 8, 9, 10 $ select & nbsp ;=& nbsp; $ db-& gt; select (); $ select-& gt; ask about how to write in statements about zend select ().
$ Sales_id = implode (',', $ sales_id );
// The echo $ sale_id value is 4, 6, 7, 8, 9, 10.
$ Select = $ db-> select ();
$ Select-> from (TB_PRODUCT ,'*');
// $ Select-> where (TB_PRODUCT. ". sales_id IN ('. $ sales_id .')");
// This sentence has an error. all fields in the search results are sales_id => 0
$ Select-> where (TB_PRODUCT. ". sales_id IN ('4', '6', '7', '8', '9', '10 ')");
// This sentence is correct
$ Select-> order (TB_PRODUCT. '. sales_id DESC ');
$ Product_list = $ db-> fetchAll ($ select );

I would like to ask, how can I write this sentence in red to make the search result the same as the following sentence?
Thank you first.
------ Solution --------------------
$ Select-> where (TB_PRODUCT. ". sales_id IN ($ sales_id )");

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.