Php outputs data and cannot desc solution-php Tutorial

Source: Internet
Author: User
Php outputs data and cannot descPHPcode & lt ;? Php $ SQL & quot; selectC. id, C. numberfromcargo1Cleftjoincargo2C2onC. numberC2.numberleftjoincargo3C3onC. numberC3.number & quot; php outputs data and cannot desc
PHP code
  
  Query ($ SQL); $ tb = ""; while ($ r = $ q-> fetch_array (MYSQLI_USE_RESULT) {$ tb. ="". $ R [number]."". $ R [shipper]."". $ R [nnne]."". $ R [po]."". $ R [invoice]."". $ R [pol]."". $ R [pod]."            ". $ R [dest]."". $ R [vessel]."". $ R [bookingDate]."". $ R [receivedBooking]."". $ R [confirmSpace]."";}?>

Zookeeper Outgoing contact
Zookeeper Outgoing contact


The SQL code is displayed, but the results cannot be obtained. What is the reason? it is correct to execute the statement separately in mysql (desc), that is, if the statement is output through while, it is still asc. why ??

------ Solution --------------------
While ($ r = $ q-> fetch_array (MYSQLI_USE_RESULT ))
MYSQLI_USE_RESULT
------ Solution --------------------
$ R = $ q-> fetch_array (MYSQLI_ASSOC );

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.