How to read data in SQL return results

Source: Internet
Author: User
Cainiao asked a question: how can I read data in the SQL return results? StdClassObject ([count (*)] = & gt; 4) & nbsp; I use SQL to query the number of records. now I want to read the value 4. how can I write it? Thank you !, PHPcodeforeach ($ arras $ v) {echo $ v;} // or ask the ec Cainiao how to read the data in the SQL return result?
StdClass Object ([count (*)] => 4)
I used SQL to query the number of records. now I want to read the value 4. how can I write it? Thank you!


------ Solution --------------------
PHP code
Foreach ($ arr as $ v) {echo $ v;} // or directly echo $ arr [0];

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.