views:

24

answers:

1

Hi,

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 this?

Thank you very much!!

+2  A: 

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.

David Caunt
Hi,thank you very much for your answer. I took the project from another company and now I realized that they used a very old version of the zend framework... this was the reason, sorry to annoy
strauberry