Calling the pdo_php tutorial in another class

Source: Internet
Author: User
Calling PDO in a different class



There is a class build classes, and PDO is already connected to call $db

I'm calling $db error in the build class, I'm prompted for a problem with query

I wrote this in the class.

$query = $db->query ($sql)

I'll answer that.




Website Construction and Solution
For class understanding is not very deep friendship help top!

Website Construction and Solution
Just say it's wrong, you don't put the wrong code out, who knows what's wrong


http://www.bkjia.com/PHPjc/632508.html www.bkjia.com true http://www.bkjia.com/PHPjc/632508.html techarticle in another class calling PDO has a class build class, and PDO has a connection called $db I call in the build class $db error, I am prompted to query a problem I wrote in the class ...

  • 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.