我有:数据库查询/模型
public function executeTest(sfWebRequest $request)
{
$query = Doctrine_Query::create()
->from('Messages')
->where('id = ?', $id);
$query->fetchArray();
}
我的确在LIB /型号功能:
public function newfunction($id)
{
$query = Doctrine_Query::create()
->from('Messages')
->where('id = ?', $id);
return $query->fetchArray();
}
,现在有:
public function executeTest(sfWebRequest $request)
{
$this->newfunction($id);
}
但我有错误:
sfException:调用未定义的方法消息操作:: newfunction。
如果:
public function executeTest(sfWebRequest $request)
{
$this->newfunction($id);
}
我已经
Fatal error: Call to a member function newFunction() on a non-object in
我能做些什么?
非常感谢帮助:) – clausix95 2011-06-06 16:16:47