Re: [fw-general] findDependentRowset - third parameter

2008-02-11 Thread debussy007

I had to check the sources ... And the third parameter was added since 1.5 !


debussy007 wrote:
 
 Hello !
 
 I can't get the third parameter of 'findDependentRowset' method to work
 ...
 My code is pretty simple, each Article has a set of photo's ArticlePhotos
 
 $articles = new Articles();   // - extends Zend_Db_Table_Abstract
 $myArticles = $articles-fetchAll($where, $order);
 
 $articlePhotos = new ArticlePhotos();   // - extends
 Zend_Db_Table_Abstract
 $selectPhotos= $articlePhotos-select()-where('to_delete = ?', 0);
 
 foreach ($myArticles as $article) {
[...]
echo $article-findDependentRowset('ArticlePhotos', null,
 $selectPhotos)-count();
[...]
 }
 
 Fatal error: Call to undefined method ArticlePhotos::select() in
 D:\websites\mysite\application\modules\partners\controllers\ArticlesController.php
 on line 26
 
 I do not understand this error since there is a 'select()' method in the
 Zend_Db_Table_Abstract, so why there is a fatal error ?
 
 Then I tried to replace with : 
 $selectPhotos= $articlePhotos-getAdapter()-select()-where('to_delete =
 ?', 0);
 
 The error disappears but the select specified in the third param of
 findDependentRowset has no effect. I should only count the rows that has
 as attribute to_delete = 0.
 
 Thank you for any help !
 Matthew.
 

-- 
View this message in context: 
http://www.nabble.com/findDependentRowset---third-parameter-tp15412760s16154p15416401.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] findDependentRowset - third parameter

2008-02-11 Thread debussy007

Hello !

I can't get the third parameter of 'findDependentRowset' method to work ...
My code is pretty simple, each Article has a set of photo's ArticlePhotos

$articles = new Articles();   // - extends Zend_Db_Table_Abstract
$myArticles = $articles-fetchAll($where, $order);

$articlePhotos = new ArticlePhotos();   // - extends Zend_Db_Table_Abstract
$selectPhotos= $articlePhotos-select()-where('to_delete = ?', 0);

foreach ($myArticles as $article) {
   [...]
   echo $article-findDependentRowset('ArticlePhotos', null,
$selectPhotos)-count();
   [...]
}

Fatal error: Call to undefined method Articles::select() in
D:\websites\mysite\application\modules\partners\controllers\ArticlesController.php
on line 26

I do not understand this error since there is a 'select()' method in the
Zend_Db_Table_Abstract, so why there is a fatal error ?

Then I tried to replace with : 
$selectPhotos= $articlePhotos-getAdapter()-select()-where('to_delete =
?', 0);

The error disappears but the select specified in the third param of
findDependentRowset has no effect. I should only count the rows that has as
attribute to_delete = 0.

Thank you for any help !
Matthew.
-- 
View this message in context: 
http://www.nabble.com/findDependentRowset---third-parameter-tp15412760s16154p15412760.html
Sent from the Zend Framework mailing list archive at Nabble.com.