Php queries multiple fields.

Source: Internet
Author: User
Php queries multiple fields.
  


3 fields! Query now is normal! Domain wants to add these two! How to get the same table! Help dedicatedip assignedips thank you ....


Reply to discussion (solution)

If judgment, then assemble the SQL statement!

Connect the three conditions with and.

Aren't multiple fields currently queried?

I did not understand the question ~

I did not understand the question ~ + 1

You have all queried *. isn't it a multi-field query ?? I don't understand...

Reference the reply from BeyondQqiang on the 4th floor: I did not understand the question ~ + 1
Again, I really cannot afford to hurt myself. I don't know what I want to ask ......

If ($ _ POST ["ip1"] = "query 1") {$ domain1 =$ _ POST [domain1]; if ($ _ POST ["ip2"] = "query 2") {$ domain2 =$ _ POST [domain2]; if ($ _ POST ["ip3"] = "3") {$ domain3 =$ _ POST [domain3]; $ where = 'domain1 = ". $ domain1. "and domain2 = ". $ domain2. "and domain3 = ". $ domain3. "'; $ SQL =" select * from tblhosting where 1 and ". $ where;

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.