开发者

Order the result of findDependentRowset does not work

I'm using the findDependentRowset() of the Zend-Framework. Here, I want to define some selection settings like ORDER or LIMIT.

The examplecode I've found doesn't work at all for me :-(

$table = new MyTable(); // extends Zend_Db_Table
$row = $table->fetchAll()->current(); 
$rowset = $row->findDependentRowset(
   'table',
   $table->select()->order('von ASC')->limit(1)
);

First thing is, that the select() method is not defined here. I have to use getAdapter() to be able to use this method. Next, I get a warning:

No reference rule "SELECT ORDER BY `von` ASC LIMIT 1"

How can I fix开发者_如何学JAVA this?

Thank you very much!!


Check the API docs for Zend_Db_Table_Row_Abstract - the Zend_Db_Table_Select should be passed in as the third parameter, not the second.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜