Call to undefined method PDO::execute()

在调试php的时候弹出报错

Call to undefined method Database::prepare()

Call to undefined method PdoMySQL::prepare()

解决方法:

参考链接:

https://stackoverflow.com/questions/3716798/call-to-undefined-method-databaseprepare

https://stackoverflow.com/questions/23371118/call-to-undefined-method-pdoexecute#

There is no method prepare in your Database class. That belongs to the PDO object that you are storing as $link.

What you are probably looking for is

Database :: $link->prepare(…)

部分代码段:

 

转载请注明原作者,如果你觉得文章对你有帮助或启发,也可以来请我喝咖啡

点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注