Home > php教程 > php手册 > 在另外的类中调用PDO

在另外的类中调用PDO

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 09:53:33
Original
1087 people have browsed it




在另外的类中调用PDO



有一个 class build类,同时 PDO 已经连接 调用为 $db

我在 build 类中调用 $db 出错,提示 query 有问题

我是在类中这样写的

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

我来回答




网站建意与解决方法
对于类 理解不是很深刻 友情帮顶!

网站建意与解决方法
只说出错,你不把错误代码贴出来谁知道出什么错误


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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template