Home > Backend Development > PHP Tutorial > Tutorial on calling PDO_PHP in another class

Tutorial on calling PDO_PHP in another class

WBOY
Release: 2016-07-13 10:52:26
Original
1044 people have browsed it




Call PDO
in another class


There is a class build class, and PDO is connected. The call is $db

I made an error when calling $db in the build class, prompting that there is a problem with query

I wrote this in the class

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

Let me answer




Website ideas and solutions
I don’t have a very deep understanding of classes. Please give me some support!

Website ideas and solutions
Just say there was an error. If you don’t post the error code, who knows what went wrong


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632508.htmlTechArticleCall PDO in another class. There is a class build class, and PDO has been connected and called $db. I am building There is an error when calling $db in the class. It prompts that there is a problem with the query. I wrote this in the class...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template