【发布时间】:2009-04-01 15:39:36
【问题描述】:
我试图返回一组对象。
但是这段代码给了我以下错误:
可捕获的致命错误:无法将 User 类的对象转换为...中的字符串
public function fetchObject($psClassname ="",$paParams =array()){
$lrResource = $this->mrQueryResource;
$liResult = null;
while($row = mysql_fetch_object($lrResource,$psClassname,$paParams)){
$liResult .= $row; <-this line produces the error
}
return $liResult;
}
【问题讨论】: