Catchable fatal error: Object of class dUser could not be converted to string in on line 16解决方案
程序员文章站
2022-04-08 13:27:21
...
Catchable fatal error: Object of class dUser could not be converted to string in on line 16
当运行getUserByName时,提示:Catchable fatal error: Object of class dUser could not be converted to string in on line 16的错误。不知道是哪里的问题,请大家帮忙指导。谢谢!!!
------解决方案--------------------
参数$name被带入了一个类dUser变量.
当运行getUserByName时,提示:Catchable fatal error: Object of class dUser could not be converted to string in on line 16的错误。不知道是哪里的问题,请大家帮忙指导。谢谢!!!
- PHP code
true)); return $pdo; } public function getUserByName(&$info, $name) { $dbpdo = $this->newpdo(); $sql = "SELECT * FROM `usermember` WHERE `user`=?"; $st = $dbpdo->prepare('SELECT * FROM `usermember` WHERE `user`=?'); $bRet = $st->execute(array($name)); $info = $st->fetch(PDO::FETCH_ASSOC); return $bRet; }}?>
------解决方案--------------------
参数$name被带入了一个类dUser变量.
相关文章
相关视频
上一篇: Oracle 传输表空间迁移数据总结
下一篇: 一次删除多条记录的sql语句