PHP Search wording please

Source: Internet
Author: User
Help PHP Search wording please expert guidance!
A and B table fields are numeric class strings: such as ' 2,3,6,34,23 ', ' 43,23,8,35 ' ....

Now to use a table field to search for B, please expert guidance under

Start is to put a field into the Likeb field, the results found no, if there is 3 in a field, then the B field 23,33,43 ... With 3 will be retrieved.

So ask for a better solution!

------Solution--------------------
Like ' 2, '
------Solution--------------------
When you save the data, it must be preceded and
Constructed like this:, 2,,4,

Then you use like ', 3, '
------Solution--------------------
Put a field into a group like B field
It's not going to work, because you know it.

But it's right to make a field into a group.
You can use Find_in_set when you compare.
Like what
Find_in_set (' 3 ', ' 23,33,43 ')
will not be matched to
  • 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.