A PHP complex judgment related issues, thanks

Source: Internet
Author: User
Ask you a question of PHP complex judgment, thank you

The database has fields a, B, C, D, E, F
Suppose the F field contents are 1, 2, 3, 4, 5, 6, respectively.
What I want to achieve now is
When F=1
I output all the contents of a, B, C, D, E in accordance with f=1
When f=2
I output all the contents of a, B, C, D, E in accordance with f=2
The following sequence is to F=6
How do I use the code to express it specifically?? Thank you

------Solution--------------------
You're all A, B, C, D, E. I guess you didn't make it clear. If you say so, the following will be fine.

SELECT a,b,c,d,e from Tbl_name WHERE F in (1,2,3,4,5,6);

------Solution--------------------
A, B, C, D, E, F are in the same sheet?
If not, you have to create a foreign key.
If the same table, the positive solution.
  • 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.