How does mysql Delete and select products from multiple dimensions?

Source: Internet
Author: User
Tags mysql delete
For example, if I want products with prices in the price range of 20-3050-6070-80, the relationship is or, and the title should contain skirts, jackets, and coats, and the relationship between the subject and children's clothes, books, and the relationship is or, how should I write such a statement? How should I design Php statements that are expressed as variables... for example, if I want a product with a price range of 20-30 50-60 70-80, the relation is or.
At the same time, the title should contain a skirt, coat, or coat,
We also want to exclude titles including children's clothing, books, and relationships as and. How should we write such statements? How should we design Php If Php is expressed as a variable? I am using thinkphp. Can I use thinkphp to encapsulate addition, deletion, modification, and query operations?

Reply content:

For example, if I want a product with a price range of 20-30 50-60 70-80, the relation is or.
At the same time, the title should contain a skirt, coat, or coat,
We also want to exclude titles including children's clothing, books, and relationships as and. How should we write such statements? How should we design Php If Php is expressed as a variable? I am using thinkphp. Can I use thinkphp to encapsulate addition, deletion, modification, and query operations?

Where (price> 20 and price <30) or (price> 50 and price <60) or (price> 70 and price <80 )) and (title like ....) or ......)

You can write it like this, but if your data volume is a little bit larger, it can easily cause serious performance problems.

You should use elasticsearch, sphtracing, xunsearch, solr, and other search engines to solve this problem.

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.